[Javascript] Challenge - Passing Object Refs to Other Windows
Peter Thompson
prthompson at ureach.com
Sat Mar 24 10:18:31 CST 2001
I have a problem that I've been struggling to
figure out.
I'm developing a web-based document control
system. When the user clicks the Submit button,
my boss wants me to then prompt for all the
approval information. I created a flowchart in
Visio and this process turns out to be quite
complicated. It means opening a series of
windows to walk the user through forms which
prompt them for info - approval names, approval
type (Parallel vs. Serial), etc. There are about
6 windows that need to be opened in this sequence.
As I open the next window, I want to close the
previous. My challenge is: how to maintain a
handle to the original document? I need to pass
a reference to this window from window to
window. That way, I can write data back to the
original document during this process.
I just can't figure out how to do it. If I
create a method in window A that I call from
window B and pass it the original window object,
that would work - but how do I reference that
method in window A?
Obviously, I have the window.opener property to
get the previous window reference but once I
close the first "dialog" box,
window.opener.window.opener.... won't work
because I've broken that chain back to the
original document by closing one of the windows.
It would look horrible to have to open all these
windows and leave them open until the last step.
If I can't pass a window reference, then is there
some way to hide an open window? I think I can
use DHTML to change it's z-order and put it
behind the top window, is that correct?
Thanks for any help!
-Peter
More information about the Javascript
mailing list