PDA

View Full Version : How to pass variable from parent window to child wondow using Model Dialog Box?


HappyTomato
11-29-2002, 04:12 AM
Could someone please HELP ???

We have a question involving the functionality of the Model Dialog Box. Is it possible to pass variable(s) instead of strings or values from the parent window to the child window? :confused:

e.g window.showModalDialog('5.html','','resizable:yes');

We try to pass a variable by placing something like:
document.form[0].input.value
in the second gap like you do for strings etc but it doesn't work. We're not too sure about the right format of doing this even if it's possible...

Bo&Vic :thumbsup:

glenngv
11-29-2002, 05:16 AM
cross-posted http://codingforums.com/showthread.php?s=&threadid=10595

if you follow the link I posted in that previous thread, you can see other links that show how to pass variables in the dialog boxes. Here are the specific links:

http://www.webreference.com/js/column90/7.html
http://www.webreference.com/js/column90/8.html

HappyTomato
12-01-2002, 09:31 PM
Thanks so much for your help :p

We have actually read through that site, but it only teaches how to pass actual strings to modal box, i.e. NOT variable or address to a particular value from the parent window.... so we're quite stuck...:confused:

Any help or suggestions will be great!! :o

Bo & Vic

glenngv
12-02-2002, 01:07 AM
you can pass the window object as seen in the link#2 (8.html) that I posted in my previous post