hi,
I have this:
page.hide "transactionpopup" page.replace_html @shift.shifttype.name+"_"+@shift.date.strftime('%d-%m-%Y') ,calendarday(:shift=>@shift) @exchangeproposals.each do |ep| domid=ep.shift.shifttype.name+"_"+ep.shift.date.strftime('%d-%m-%Y') page << "if $('#{domid}') {" page.replace_html domid ,calendarday(:shift=>ep.shift) page << "}" end
the problem is with this part:
page << "if $('#{domid}') {" page << "}"
when i use this, my script doesn't work. , nothing happens and I am not getting errors at all
I dont have a clue what the problem is. when i check with firebug i see this response:
try {
Element.hide("transactionpopup");
Element.update("Nacht_30-05-2008", "\u003Cdiv style='width:90%'\u003Ejos\u003Cbr\u003E\u003Cimg alt=
\"Negotiate\" border=\"0\" src=\"/images/negotiate.gif?1210763277\" /\u003E\u003C/div\u003E");
if $('Nacht_29-05-2008') {
Element.update("Vroeg_21-05-2008", "\u003Cdiv style='width:100%; height:100%;background:#d0e6f6'\u003Eremco
\u003C/div\u003E");
}
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.hide(\"transactionpopup\");\nElement
.update(\"Nacht_30-05-2008\", \"\\u003Cdiv style=\'width:90%\'\\u003Ejos\\u003Cbr\\u003E\\u003Cimg alt
=\\\"Negotiate\\\" border=\\\"0\\\" src=\\\"/images/negotiate.gif?1210763277\\\" /\\u003E\\u003C/div
\\u003E\");\nif $(\'Nacht_29-05-2008\') {\nElement.update(\"Vroeg_21-05-2008\", \"\\u003Cdiv style=\'width
:100%; height:100%;background:#d0e6f6\'\\u003Eremco\\u003C/div\\u003E\");\n}'); throw e }