Ajax in ruby on rails

  • Thread starter Saravanankumar Saravanan
  • Start date
S

Saravanankumar Saravanan

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.
 
D

Deepak Kumar Shivhare

Saravanankumar said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top