PDA

View Full Version : Closing a pop up window


hubbni
05-15-2003, 07:40 AM
I have a pop up window with content in it, and I want to be able to click on a link inside the popup, and have the pop up close, and go to that page in a full window. Thanks.

Roy Sinclair
05-15-2003, 04:01 PM
<a href="#" onclick="parent.location.href=location.href;window.close();return false;">Open this in the main window</a>

Vladdy
05-15-2003, 04:20 PM
You should not be opening popup in the first place :rolleyes: :rolleyes:

hubbni
05-19-2003, 08:02 PM
Not sure where to put my link inside of that tag, could someone give me an example?

Roy Sinclair
05-21-2003, 01:17 AM
The script I gave you will load the current document into the parent window and then close the popup. Your wording is somewhat ambiguous but if you wanted to have a link that when clicked on would load the target of the link into the parent window and at the same time close the popup then do this:

<a href="LinkWhereIWantToGo" target="_parent" onclick="window.close();return true;">Link Text</a>

Dave Cotton
05-21-2003, 04:17 PM
Try this to just close window?



<form>
<input type="button" value="Close Window" onClick="window.close()">
</form>

<a href="javascript:window.close()">Close Window</a>