Re: Can RoR handle AJAX Response by Static Javascript code?

Marnen Laibow-Koser
2010-05-24T13:09:28Z

Bill Walton wrote:
> Hi Jian Lin,
>
> On Mon, May 24, 2010 at 7:33 AM, Jian Lin
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
>
>
>> Will there be situation where the code is quite big (like 1 or 2k) that
>> RJS can use some sort of static Javascript already loaded to handle the
>> effect?
>>
>
> You can call any loaded Javascript function, including ones you''ve
coded
> yourself, using page.call from an RJS template or render block.  Cody
> Fauser''s "RJS Templates" PDF, available for $10 at
O''Reilly, is still
> the
> best source on RJS IMHO.

But why use RJS here, which tends to encourage poor-quality JavaScript
programming?  Heck, why use Rails and Ajax at all?  If the JavaScript is
static, just do the whole thing on the client side.

>
> HTH,
> Bill

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org

--
Posted via http://www.ruby-forum.com/.