JavaScript variable into <%= %>-area


#1

Hi!
My problem is simple (to understand) but I dont know how to solve it.
Below I want to put “js_param” where the “???” are!

Anyone know how to do this?

index.rhtml:

... function js_udt(js_param) { setTimeout("<%= remote_function(:update => 'dummy', :url => { :action => 'update_fcn', :param => ???? }) %>", 0); } ... ----------------------------

Thanx!


#2

rickthemick wrote:

setTimeout("<%= remote_function(:update => ‘dummy’, :url => { :action
=>
‘update_fcn’, :param => ??? }) %>", 0);
}

setTimeout( “new Ajax.Updater(‘dummy’, '<%= url_for(:action =>
‘update_fcn’) -%>?param=” + escape(js_param) + “’, {asynchronous:true,
evalScripts:true})”, 0);


We develop, watch us RoR, in numbers too big to ignore.