AJAX + Ruby on rails

Hi all ,
I was trying the AJAX example given by Curt hibbs
(Radar – O’Reilly) .In the
example it was putting a list item in the list .I tried adding a new
text box (input tag ) . I was successfull in adding the text boxes into
the table when the button was clicked .But I am in doubt on how can I
capture the contents of the text boxes and add those to my database
.Also when i took the view source of the page I can see that there is no
input tags or id values to be used.
Please help me out in uunderstanding what will be the name/id of the
controls created by the form_remote_tag() .

Please help me out ,

Thanx and regards,
Naroor R.

On 12/9/05, naroor rathish [email protected] wrote:

Hi all ,
I was trying the AJAX example given by Curt hibbs
(Radar – O’Reilly) .In the
example it was putting a list item in the list .I tried adding a new
text box (input tag ) . I was successfull in adding the text boxes into
the table when the button was clicked .But I am in doubt on how can I
capture the contents of the text boxes

Hi,
use the form_remote_tag’s :update parameter to indicate what DOM
element to
update and
and use its :url to decide what to call on ur server. I cant remember
the
exact syntax but it goes like this …like a regular form except that the
form_remote uses Ajax.Updater to send the serialized form data.
the ‘submit’ method in your controller should update your database

<%form_remote_tag :update => ‘someid’ , :url => {:controller => ‘form’
,:action =>‘submit’ } %>
<% text_field “id” “Enter Text” %>
<%submit “submit” %>
<%end_form_tag>

Read the docs…its pretty well explain there.
http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html
Vivek

Hi Vivek,
Thanx for the reply.But I think my question is not clear .Please
visit the site http://blinksale.com/ and register for a free trial.When
you login you can see the JAX effect that I am trying to re create.
Also The ajax please go through the ajax effect at
Radar – O’Reilly .Both
using form_remote_tag() and link_to_remote() .I tried form_remote_tag()
.

Please let me know your ideas.

Thanx and regards,
Naroor R.