PDA

View Full Version : How to have open pages automatically closed


paulj
02-11-2003, 12:44 AM
I'm using the script <SCRIPT LANGUAGE="JavaScript">
<!--
function JumpToIt(list) {
var newPage = list.options[list.selectedIndex].value
if (newPage != "None")
window.open(newPage)}
//-->
</SCRIPT>
to load my drop down navigation links (all either html or jpg's) to outside of my framed index page. How do I get my other pages after they load not to stay open in the background. I'm using the same script on each page

Thanks everone who responds

glenngv
02-11-2003, 03:45 AM
var win;
function JumpToIt(list) {
var newPage = list.options[list.selectedIndex].value
if (newPage != "None")
win = window.open(newPage)
}

function closeWin(){
if (win && !win.closed) win.close();
}

just call closeWin() in a link or button to close the other windows.