Using form_remote_tag in an helper

Don't use a block with form_remote_tag in this case. You want
something like this:

   form_remote_tag(:url => ...blah...) + submit_tag('Add to cart') +

bhbrinckerhoff wrote:

Any ideas on how to do this now that end_form_tag is deprecated?


On Oct 6 2007, 6:18 am, Stefano Grioni <rails-mailing-l...@andreas-


I have a scenario wherein i have opened a javascript popup window, now i
want the user to do some actions in that window, and now the form from
the window is submited, on submit i call a method that does the server
side handling and then on success i call the window.close and now on
complete i am trying to invoke another ajax call to update a dom element
in the main window.
My code looks like this
<%= form_remote_tag :method=>'post', :url=>{:action =>'add_from_pop_up',
:count => count},
     :success => "window.close();",
     :complete => "javascript:test(count)"%>

and the javascript fcn is
function test(count)
    qs = "count="+ count
    new Ajax.Request('/reporting/update_div', {parameters:qs,
asynchronous:true, evalScripts:true});
      return false;

Any suggestions on how to invoke this javascript method to update a DOM