Hi all,
I'm building an application which uses mostly ajax to update the
sections of the page. Now I've come to some thoughts on how to make the
ajax-handling more efficient / less buggy.
Currently, when the page loads up, I start some "new Ajax.Updater"-stuff
to fill some sections with content from the db. I also registered
watchers which also start nearly the same ajax-calls as on inital
page-loading.
Now I've come to a point where I want to reduce the ajax-calls, because
many of the contents is already there (in a session e.g.) or i will
preload it. From the server-results I want to create javascript-objects
dynamically and show them when a particular link is clicked.
Are there any ressources on the web explaining on how to fill the
content coming from ajax into javascript objects ? [1] I'm pretty new to
the prototype stuff. And I use Rails, so maybe there's a cool solution ?
[2]
Thx!
Jan
[1] Just discovered
http://particletree.com/features/preloading-data-with-ajax-and-json/
But don't know if I'd need JSON to do this within Rails ?
[2] Concerning Rails:
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
May this be the solution ?
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs