Forum: Ruby on Rails Using form_remote_tag, setting the form name

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B9f2cd54b3f85455af152162c2e5b1b2?d=identicon&s=25 chris hulbert (Guest)
on 2006-03-15 03:32
I'm using form_remote_tag like this:

<%= form_remote_tag \
  :update => "div_id_dataentry_bottom_ajax",
  :loading => "document.getElementById('wait').innerHTML='Loading...';",
  :url => { :action => "dataentry_bottom_edit" } %>

And it makes this code:

<form action="/x/dataentry_bottom_edit" method="post" onsubmit="new
Ajax.Updater('div_id_dataentry_bottom_ajax', '/x/dataentry_bottom_edit',
{asynchronous:true, evalScripts:true,
onLoading:function(request){document.getElementById('div_id_dataentry_bottom_ajax').innerHTML='Loading...';},
parameters:Form.serialize(this)}); return false;">

How do i get it to set the name tag, so i can do some javascript???
Like this:
<form name="xxx" ...

Cheers, you guys are awesome.
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Bob Silva (Guest)
on 2006-03-15 04:36
(Received via mailing list)
I believe you want:

form_remote_tag :html => {:name => 'my_name'}, :update => ...

Bob Silva
http://www.railtie.net/
B9f2cd54b3f85455af152162c2e5b1b2?d=identicon&s=25 chris hulbert (Guest)
on 2006-03-15 04:51
Bob Silva wrote:
> I believe you want:
>
> form_remote_tag :html => {:name => 'my_name'}, :update => ...
>
> Bob Silva
> http://www.railtie.net/

I worship at your feet...
This topic is locked and can not be replied to.