Assuming your requirement is to pass some data (fetched/calculated in the modal window) back to the parent window, you can either do any of the following:
In the Modal window:
-----------------------
1. window.dialogArguments.<variable of the argument received> = <data you want to pass>
OR
2. window.returnValue=<data you want to pass>;
In the Parent window:
-----------------------
case-1.
-------
<parameter passed to modal window>.<variable set in the modal-window>
example: myColourDialog.myColour
case-2
--------
The value returned by the modal window is assigned to any variable which is specified while opening the window.
example: var returnValue = window.showModalDialog(....);
returnValue will be assigned the value returned by modal window.
This is indeed very helpful information.
Thank you Jake and Steve!!!
Prashant: Your requirement is not clear.
Assuming your requirement is to pass some data (fetched/calculated in the modal window) back to the parent window, you can either do any of the following:
In the Modal window:
-----------------------
1. window.dialogArguments.<variable of the argument received> = <data you want to pass>
OR
2. window.returnValue=<data you want to pass>;
In the Parent window:
-----------------------
case-1.
-------
<parameter passed to modal window>.<variable set in the modal-window>
example: myColourDialog.myColour
case-2
--------
The value returned by the modal window is assigned to any variable which is specified while opening the window.
example: var returnValue = window.showModalDialog(....);
returnValue will be assigned the value returned by modal window.