Re: Returning JS in AJAX

David Morton
2005-06-02T05:20:11Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik Hatcher wrote:

> Questions - why send JavaScript down?  What advantage is there to
> doing?  I can envision it being useful to update multiple elements at
> one time perhaps, but I''m curious what your use case is.

I was previously working on this in patch 933:

http://dev.rubyonrails.com/ticket/933#preview

Indeed, I use this to update multiple locations at the same time, and to
update several form values.

This helper is used in a view or partial, the javascript content of
which is returned to the client, where it is eval''d


- --
David Morton
Maia Mailguard server side anti-spam/anti-virus solution:
http://www.maiamailguard.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCnpcLSIxC85HZHLMRAmLkAJ9ZqI339BVXK9uYD9C0wzM5ZleAyACeLO9d
1PXgO1YTdv/aw2kib0q+bQs=E8Q7
-----END PGP SIGNATURE-----