View Full Version : Open close link

11-08-2007, 07:15 PM
I have a main page, user clicks on a link, a new browser window opens. Now the user wants to click on link within that new window to close the window and link to a new page on the main page..

11-09-2007, 02:41 AM
you could try something like this:

<script language="javascript" type="text/javascript">
function closeandrefresh(link) {
window.opener.location = link;

and use this as your link:

<a href="someurl.html" onclick="closeandrefresh(this.href);return false">someurl.html</a>

this should close the popup window and open the link in the original window


i haven't tested it so tell me what happens

11-09-2007, 02:52 AM
double post