Click to See Complete Forum and Search --> : pass the value of the selected option from popup to its parent window


Waterloo1
12-04-2003, 09:46 AM
Hi, I have a parent window with 2 frames and a child popup window. I need to pass a value in the select box (frommonth) in a form (addvacations) in the popup window back to a select box (months) of a frame (navigation)in a form (form1) of its parent window. But the parent window is not getting the selected value from the popup.

code:

<script language="JavaScript">
var path = ""
path = "document.addvacations.frommonth"
opener.parent.navigation.form1.months.value = path.options[path.selectedIndex].value;

</script>

Webskater
12-04-2003, 10:22 AM
I'm not sure - its one of these ...
EITHER
window.opener references the window that opened your popup - even if it is a frame i.e. the frame is referenced directly so you don't need your reference to navigation
OR
This is not true. In which case you would need
window.opener.frames('navigation') etc

If you need to reference a frame you cannot use
window.opener.nameofframe
it must be
window.opener.frames('nameofframe')