The correct way is to make a helper which puts the actual Ajax.Updater
code in window.onload.
I''m sure you saw this coming :)
On 6/25/05, Matt Jankowski
<mjankowski-3V1LzDqIiU+4+7hldlPAjkEOCMrvLtNR@public.gmane.org>
wrote:> What I''d like to do:
> 
> -Load a page
> -Immediately make a call to the server to get a block of content which
> will be inserted into the page
> 
> The content block contains information which is calculated on the fly,
> and is, by far, a more db/cpu intense part of building the page.  There
> will be a "calculating" or other such graphic so that the user
knows
> something is coming to fill the div where the content block goes, and so
> that they understand the delay in this happening.
> 
> I''ve got this working using link_to_remote and I''ve got
this using
> periodically_call_remote, so I''m pretty sure I''ve got
things -mostly-
> right -- however -- the user shouldn''t have to do anything to
initiate
> the replacement, and I only want it to happen once, when the page loads.
> 
> Sooo... Is their a helper function that will accomplish this?  Or is the
> correct way to just put the actual Ajax.Updater code into the
page''s
> ''onload''?
> 
> Thanks,
> -Matt
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
> 
-- 
Tobi
http://www.snowdevil.ca - Snowboards that don''t suck
http://typo.leetsoft.com - Open source weblog engine
http://blog.leetsoft.com - Technical weblog