Hi!
I would like to extend my onclick parameter of button_to_remote with another javascript function call, but i couldn't find any answer for that. So i have sg like this:
button_to_remote('>', :url => {:action => "show_dtree", :id => tree_child.id, :dir1 => dir11, :dir2 => dir12}
what generates the following code:
<input onclick="new Ajax.Request('/d_trees/show_dtree/3?dir1=1&dir2=2', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('2e8e2147c344bcee0edf40f8fe6072c12dc928d7')});" type="button" value=">" />
And my aim would be to call a foo() function after the ajax request object instantiated:
<input onclick="new Ajax.Request('/d_trees/show_dtree/3?dir1=1&dir2=2', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('2e8e2147c344bcee0edf40f8fe6072c12dc928d7')});foo();" type="button" value=">" />
Is there any way to this beside to generate the whole button by myself?
Thanks for your help!