Ajax in ruby on rails

Hi,
I have user model & a method to edit it.
Using normal ruby with html, i did it.
But, using ajax i want to submit the page.

I know there is a tag
"<%=form_remote_tag %> "
But, already i’ve used
"<% form_for :user …%>

    I want to submit the page using ajax.
    Is it possible? If, it is, please help me to how to do it?

                   Thanks.

Saravanankumar S. wrote:

Hi,
I have user model & a method to edit it.
Using normal ruby with html, i did it.
But, using ajax i want to submit the page.

I know there is a tag
"<%=form_remote_tag %> "
But, already i’ve used
"<% form_for :user …%>

    I want to submit the page using ajax.
    Is it possible? If, it is, please help me to how to do it?

                   Thanks.

Hello,

Check it out the following link. May it will help you.

http://blog.invisible.ch/files/rails-reference-1.1.html#form_for

and
Having multiple submit buttons is fairly easy with a regular form_for
tag. You merely create your submit buttons like below.

<%= submit_tag “Send”, :name => “send_button” %>
<%= submit_tag “Save Draft”, :name => “draft_button” %>

Thanx
Deepak
http://www.ajuby.com