Forum: Ruby on Rails render :update issue

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C29956804f7519555a64ee97cf8ea1b4?d=identicon&s=25 Nate Nate (rubynate)
on 2007-05-12 18:11
Hey all,
   I have a case where I need to use rjs to update add some new content
(a prototype window) to a page and then fill in the content of that
window.  The issue I'm running into is that to create the window I call
a javascript function which creates the window.  The, I need to fill in
a div in that window with some content which is produced from another
javascript call.

If I make the calls back to back in my render :update block, I get an
error that an invlaid or illegal string was specified.  I'm assuming
that this is because the div I created with my first javascript call
isn't present in the page that is being used to call the second.

The code looks something like this:

render :update do |page| "createWindow", *params... "fillInWindow"

The fillInWindow function is attempting to load content into a div
created by the createWindow call.  Is there some way to update the page
before calling the second js function?

I hope this makes sense, any help would be greatly appreciated!
C29956804f7519555a64ee97cf8ea1b4?d=identicon&s=25 Nate Nate (rubynate)
on 2007-05-12 19:25
Nevermind, it looks like a bug with the js package I'm using...
This topic is locked and can not be replied to.