PDA

View Full Version : Close Window/Load Another


fat_dog
10-31-2002, 03:33 PM
Hi guys n gals,

I'm after some code that when a link is clicked (to open another pop-up window) the original page closes.

I fiddled and the old window closed before the new link was told to load :/

Could anyone help me out please?

<a href="javascript:openpopup1()" target="_self"><font color="#000099" size="2" face="Verdana"><br>
Review</font></a></div>

That's my link, and I want the page to close down after it has started to load the new page.

Thanks :)

beetle
10-31-2002, 03:57 PM
function openpopup(nUrl) {
window.open(nUrl,'winName','width=500, height=300); // Or whatever
self.close();
}

<a href="page.htm" onClick="openpopup(this.href); return false;">review</a>