Hello All, The page below is a popup (http://www.example.com/PopUpPage.htm) launched by http://www.example.com/Parent-Page.asp I want to close the popup and pass VARTOPASS to https://www.example.com/Not-The-Parent-Page.asp Trying to figure out how to append DOCUMENT.FORM1.VARTOPASS.VALUE into URL for onClick="opener.location'URL';self.close;" Below is page: http://www.example.com/PopUpPage.htm <html><head></head><body> <form name="form1" method="post"> <select name="VarToPass"> <option value="Val1">Val1</option> <option value="Val2">Val2</option> </select> <input onclick="opener.location='https://www.example.com/Not-The-Parent-Page.asp?PassThis=DOCUMENT.FORM1.VARTOPASS.VALUE';self.close();" type="submit" value="Submit"> </form> </body></html> Thank you, Bob P.
Uhm, no offense, but why the devil are you breaking the form's natural functionality with that script-tard nonsense? Though it looks like you've "popped up a window" -- which means your code will NEVER work for some browsers since a lot of folks (opera and FF users) block a window's ability to close itself. (or open new windows for that matter) In terms of what you're trying to do -- just do the form properly with and actual ACTION attribute, and have the page it loads do the window.close(); Think about it -- you're going to another page with .location, so the rest of the script can't run, or if it does it won't submit. You have to let the submit resolve BEFORE you close, which is why the close should be in the responder, not in the sender. Well, unless you switch to AJAX, which would be tempting if you don't care about accessibility or graceful degradation -- which from this code you already don't have. Instead of popping up a window put the FORM in the parent page as position:fixed (adding it via the script being the best way, with a noscript fallback maybe) -- have ajax handle the submit, erasing the form when done.