Re: Returning JS in AJAX

Erik Hatcher
2005-06-02T09:52:29Z

On Jun 2, 2005, at 2:02 AM, Thomas Fuchs wrote:

> Actually, I think both are.
>
> Executing script that is returned by a view is as simple as using  a
> :complete => ''eval(request.responseText'' insted of the
:update =>
> ''...'' in the
> call to link_to_remote. That''s all there is to it.

Ah yes!  In fact, I''m using that feature in another part of my
application so I should have remembered and mentioned that.  I
haven''t looked, but I presume there is a similar helper to generate a
button instead of a hyperlink?

> There is also an example of this in my chapter of the beta rails book.

Indeed there is - and everyone on this list should own that book :)

Thomas - thank you for your wonderful work with Prototype, the
effects, and AJAXy stuff.  Great work!

     Erik