Forum: Ruby on Rails javascript that remote_function creates

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Damien T. (Guest)
on 2006-06-08 00:01
I'm tring to use remote_function instead of writing all the javascript
out, but am having difficulties..

I have this code in a layout:

<body onload="<%= remote_function(:update => 'show_active', :url =>
{:action => 'show_active_bugs'},
			:complete => visual_effect(:blind_down, 'show_active')) %>">

Which creates the HTML:

<body onload="new Ajax.Updater('show_active', '/bugs/show_active_bugs',
{asynchronous:true, evalScripts:true, onComplete:function(request){new

Problem is that the double quotation marks in 'new
Effect.BlindDown("show_active",' are ending the onload quote marks from
the body tag.

Is my only option hand coding it or am I just doing this the wrong way??

Thanks for any help..
This topic is locked and can not be replied to.