Q about close open window with link

Results 1 to 5 of 5

Thread: Q about close open window with link

  1. #1
    Join Date
    Dec 1969

    Default Q about close open window with link

    Hello. I just want to know if I can click a link on the main browser, and have the open window close due to it.<BR><BR>Like if<BR><BR>Page1.htm says "Welcome. Click this link to open a window, I can get that window to open"<BR><BR>But the open window submits to a script that goes to a confirmation page. I do NOT have control over that, it&#039s on another server. So I can&#039t code a window name.<BR><BR>Is there a way to STILL code it so I click a link, and REGARDLESS of the page it goes to, the top window will close?<BR><BR>Thank you

  2. #2
    Linda Guest

    Default You could try ...

    I dont know if it&#039ll work but you could try <BR><BR>window.opener.close()<BR><BR>

  3. #3
    Dan Evans Guest

    Default RE: You could try ...

    Do you mean that the window you&#039re opening is not editable by you and you want to close the first window? If so, why not just put a window.close() line after the window.open(...) line? Or does this have trouble with timing?<BR><BR>-Dan Evans

  4. #4
    Join Date
    Dec 1969

    Default Here's the problem...

    The pop up window automatically submits an email to a subscriber script (Listserv) so if I have that window close after it opens, will it have time to submit the email? (Via querystring)<BR><BR>So if main window is on domain.com<BR>The pop up submits to otherdomain.com<BR><BR>So, there can&#039t be a way to call that window when it&#039s DONE and close it. So, would the window.close feature close it, but STILL have the for submit?<BR><BR>That was the dilema. I have since used frames to eliviate the problem, but I am still curious if it is possible to have a form submit in that popup and close right after it submits. That would be quite cool, actually.<BR><BR>Thanks

  5. #5
    Linda Guest

    Default RE: Here's the problem...

    Again, I dont know if it&#039ll work but you could try <BR><BR>window.opener.submit();window.opener.close () <BR><BR>but again, there may be a timing problem. If you have access to the Opener code you can close the window after the submit in that window.<BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts