# Are there a few basic ways to do AJAX on Rails?

**URL:** <https://www.ruby-forum.com/t/are-there-a-few-basic-ways-to-do-ajax-on-rails/114593>\
**Category:** Rails\
**Created:** [September 17, 2007, 4:53am UTC](https://www.ruby-forum.com/t/are-there-a-few-basic-ways-to-do-ajax-on-rails/114593 "2007-09-17T04:53:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 17, 2007, 4:53am UTC](https://www.ruby-forum.com/t/are-there-a-few-basic-ways-to-do-ajax-on-rails/114593/1 "2007-09-17T04:53:27Z")

</div>

are there a few basic ways to do AJAX on Rails? or is it open ended…  
just like using MFC to write a Win32 app… you can do it any way you  
want.

right now I see two ways to update content using AJAX on Rails:

one is to

link\_to\_remote or form\_remote\_tag  
with the :update option to update the DOM\_Object.innerHTML with the  
action code returned.

the other is to  
link\_to\_remote or form\_remote\_tag  
and just call to the action, update the data, and then let the RJS  
handles the rest.

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/are-there-a-few-basic-ways-to-do-ajax-on-rails/114593/2 "2007-09-17T13:23:51Z")

</div>

Hi, AJAX as implemented and used in Rails is not limited to  
link\_to\_remote  
or form\_remote\_tag. I would recommend “AJAX on Rails” or other  
resources  
by using Google. Next, the more detail that you put into your question  
the  
better people on the list can assist you. Lastly, Rails is a web  
development framework that can be used in many ways to construct an  
application. Thus, there’s no one way of doing something in Rails.  
Good luck,

-Conrad
