Have never done it, but I''m guessing that you could do:
<body onload="new
Ajax.Request(''/path/you/want/to/call'')">
On Jan 27, 2008 9:31 PM, Henry Collingridge
<henry.collingridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi all,
>
> I have a view in which periodically_call_remote is updating a partial
> every 5 seconds. Actually, the updating is getting done in an rjs
> which also calls effect.highlight (via visual_effect :highlight) on
> table elements that have a certain CSS class assigned to them.
> I would like this Effect.Highlight functionality to occur on page load
> as well as every 5 seconds, so I want to make an extra call to the
> same action that is currently getting called by the
> periodically_call_remote statement.
>
> What is the best way to make an Ajax call as soon as the page has
> loaded?
>
> Thanks in advance!
>
> Henry
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---