16 Mar, 2007

Published at 08:08PM

Tagged with rails, ajax, and programming

This post has 1 comment

Add a loading image for all ajax requests

Do you get tired of passing the :loading and :complete options to your link_to_remote’s? Me too. I usually keep some sort of ‘loading’ .gif in my layout somewhere, and set it to show/hide on each ajax call. I stumbled upon a solution using event:Selectors the other day, and it worked like a charm. You may be able to register ajax responders directly in your prototype.js file, but from past experience I’ve found eventselectors.js to be useful, so having it handy isn’t so bad.

Comments

pulak Wednesday, 14 Jan, 2009 Posted at 01:16AM

good

Do you have something to say about this post?
Retype the image to the right Spam Hint: Are You Human? Textile Formatting Tips

or

Ryan Heath | Site Management A Ruby on Rails production.

This site is a Formed Function. Formed Function LLC | @formedfunction | Get in Touch