# Simple ajax guides or tutorials

**URL:** <https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181>\
**Category:** Rails\
**Created:** [March 17, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181 "2008-03-17T18:35:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 17, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181/1 "2008-03-17T18:35:20Z")

</div>

Im looking to add ajax to my website and wanted to start off small, I  
was wondering if anyone knew some ajax guides/tutorials or had there own  
tips on the use of some simple ajax. I looking for anything that can  
make my site look better or work better.

---

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 17, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181/2 "2008-03-17T19:20:02Z")

</div>

Alan Red wrote:

> Im looking to add ajax to my website and wanted to start off small, I  
> was wondering if anyone knew some ajax guides/tutorials or had there own  
> tips on the use of some simple ajax. I looking for anything that can  
> make my site look better or work better.

I highly recommend this book.

> **[RJS Templates for Rails](https://www.oreilly.com/library/view/rjs-templates-for/0596528094/)**
>
> RJS templates are an exciting and powerful new type of template added to Rails 1.1. Unlike conventional Rails templates that generate HTML or XML, RJS templates generate JavaScript code that … - Selection from RJS Templates for Rails \[Book\]

–  
[http://www.5valleys.com/](http://www.5valleys.com/)  
[http://www.workingwithrails.com/person/8078](http://www.workingwithrails.com/person/8078)

---

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 18, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181/3 "2008-03-18T13:44:40Z")

</div>

Agreed. $15 well spent.

The next step up is this one:

> **[Ajax on Rails](https://www.oreilly.com/library/view/ajax-on-rails/0596527446/)**
>
> Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches intermediate … - Selection from Ajax on Rails \[Book\]

It’s a great book that will give you a broader base in many areas, not  
just ajax.

The general axiom for ajax is: static first, then ajax. By following  
that path you avoid getting domain/framework issues confused with RJS  
issues. That’s especially a concern when you’re just starting out.

---

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 18, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181/4 "2008-03-18T18:01:59Z")

</div>

I happened to be browsing through the Scott R. book “Ajax on  
Rails” when your message popped up.

It’s a good book but some of the examples don’t work the same under  
Rails 2.0.2. A little consulting at [api.rubonrails.com](http://api.rubonrails.com) solved the  
problem though. And if you type in all the examples in chapter 3  
into one page you’ll get conflicting id’s.

The api docs refer to the scriptaculous page, and I was surprised to  
see rails examples there that told me what I wanted to know. For  
example:  
[http://demo.script.aculo.us/ajax/sortable\_elements](http://demo.script.aculo.us/ajax/sortable_elements). To find it I had  
to Google: ‘sortable\_element site:script.aculo.us’.

The example of using sortable\_element in Raymond’s chapter 4 leaves  
out the requirements for #id’s that are explained on the scriptaculous  
site. But that’s the exception, not the rule. It’s a pretty good  
book.

And Raymond has a chapter on security, which was a nice surprise.

F

---

<div class="post-metadata">

**Author:** ![megax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/94ad74/32.png) [@megax](https://www.ruby-forum.com/u/megax)\
**Post date:** [March 18, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/simple-ajax-guides-or-tutorials/132181/5 "2008-03-18T17:43:05Z")

</div>

Specifically for Ajax on RoR, the book Agile Web D. with Rails  
by Thomas and Hansson has an excellent intro. It covers all the basics.

[http://www.amazon.com/Agile-Web-Development-Rails-2nd/dp/0977616630/ref=pd\_bbs\_sr\_1?ie=UTF8&s=books&qid=1205858542&sr=8-1](http://www.amazon.com/Agile-Web-Development-Rails-2nd/dp/0977616630/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1205858542&sr=8-1)

RoR Power  
[http://www.rorpower.com](http://www.rorpower.com)

Alan Red wrote:

> Im looking to add ajax to my website and wanted to start off small, I  
> was wondering if anyone knew some ajax guides/tutorials or had there own  
> tips on the use of some simple ajax. I looking for anything that can  
> make my site look better or work better.
