This seems to be a common problem. I have posted before but didn't get a resolution so I am going to post again but a little differently.
What I need to do is pass a value from a child popup window to the parent window. When I get the value back on the parent window I can hide or expose a button based on the value passed back.
Parent Code:
Child Code:Code:<body style="background-image: none; background-color: White" class="floormgr" bgcolor="#FFFFFF" text="#000000"> <input type="hidden" name="publish" value="" />
I get an error that "self.opener.document is not an object".Code:<script type="text/javascript"> function onOK() { if(formOpenLayout.layoutname.value == '' && formOpenLayout.layoutname.value != null) { alert('You must select a layout.'); formOpenLayout.layoutname.focus(); return; } else { var sLayout = formOpenLayout.layoutname.options[formOpenLayout.layoutname.selectedIndex].text; //alert("Name: " + sLayout + ", Status: " + sLayout.indexOf('UNPUB')); if (sLayout.indexOf('UNPUB') > 0) { self.opener.document.getElementsByName('publish').item = "unpublished"; } window.returnValue = formOpenLayout.layoutname.value; window.close(); } }
Any help would be appreciated.
Thanks.


Reply With Quote
Bookmarks