Forum: Ruby on Rails Loading partial after page loads

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Scott (Guest)
on 2009-06-06 00:27
(Received via mailing list)
For performance reasons, I need to render a partial asyncronously
(after the page loads).  I've already isolated the code into a
partial, but I haven't figured out how to render it after the page
loads.  Do I have to fire off the onload event in raw javascript?  Any
ideas how to do this?  It seems like a common problem, but I haven't
seen any solutions online for this.

Thanks,
Scott
Yanni M. (Guest)
on 2009-06-06 00:36
Yeah, you could do it with ajax and onload

maybe this is what you are looking for?

http://railsforum.com/viewtopic.php?id=30266



Scott wrote:
> For performance reasons, I need to render a partial asyncronously
> (after the page loads).  I've already isolated the code into a
> partial, but I haven't figured out how to render it after the page
> loads.  Do I have to fire off the onload event in raw javascript?  Any
> ideas how to do this?  It seems like a common problem, but I haven't
> seen any solutions online for this.
>
> Thanks,
> Scott
This topic is locked and can not be replied to.