[thelist] JS: catching a window.returnValue from a Modal Dialog...

Jeff Howden jeff at jeffhowden.com
Mon Sep 8 10:48:21 CDT 2003


tom,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tom Dell'Aringa
>
> Working with a modal dialog. Setting a return value like
> so:
>
> window.returnValue = "foo";
>
> which only applies to a modal dialog.
>
> Question: How do I catch this value? The page doesn't
> say.  I don't see any event being fired off, I can't
> use onload since the opener is not reloading. In a
> modal dialog there is no opener connection so I can't
> use that either. Anyone know?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

it's so simple you're going to kick yourself.

a modal dialog behaves identically to a confirm, with the exception that the
returned value can be more than just a boolean.  so, how do you get the
value of a confirm for later use?  simple, you assign the call to a variable
and after the confirm has been interacted with by the user, the variable
contains the return value from that confirm.  the very same is true for the
modal dialog.

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/




More information about the thelist mailing list