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

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.
chris hulbert (Guest)
on 2006-03-15 04: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,
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.
Bob S. (Guest)
on 2006-03-15 05:36
(Received via mailing list)
I believe you want:

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

Bob S.
chris hulbert (Guest)
on 2006-03-15 05:51
Bob S. wrote:
> I believe you want:
> form_remote_tag :html => {:name => 'my_name'}, :update => ...
> Bob S.

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