Chris and Ibatullin,
Thank you for your responses. Both of your solutions have places in the
app I am developing.
Regards,
Eric
-----Original Message-----
From: Chris Scott [mailto:chris@e...]
Sent: Friday, July 19, 2002 8:21 AM
To: javascript
Subject: [javascript] Re: ShowModalDialog and Redirect Parent
Hi Eric
> Question... Does anyone know of a way to redirect the parent based on
> the results of a modal pop-up? I know that this is doable via
> window.opener, but was wondering if a modal pop-up can be programmed
to
> do the same thing, with window.returnvalue perhaps?
If you pass the modal dialog a handle to the current window when you
open
it...
var myModal=showModalDialog("modal.asp",window);
You can access it from the dialogArguments property of the modal window
&
change the location of the parent page...
var myWin=window.dialogArguments;
myWin.document.location.href="redirect.asp";
However, the parent page will not be changed until the modal dialog is
closed.
HTH,
Chris
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20