# Ajax in ruby on rails

**URL:** <https://www.ruby-forum.com/t/ajax-in-ruby-on-rails/89406>\
**Category:** Ruby\
**Created:** [March 20, 2007, 7:29am UTC](https://www.ruby-forum.com/t/ajax-in-ruby-on-rails/89406 "2007-03-20T07:29:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Post date:** [March 20, 2007, 7:29am UTC](https://www.ruby-forum.com/t/ajax-in-ruby-on-rails/89406/1 "2007-03-20T07:29:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saravanan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb8c5e/32.png) [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Post date:** [March 20, 2007, 7:42am UTC](https://www.ruby-forum.com/t/ajax-in-ruby-on-rails/89406/2 "2007-03-20T07:42:00Z")

</div>

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](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](http://www.ajuby.com)
