|
exit popup issue...
how come it works when I try it on my computer, but when I upload it on the server and close a window nothing happens? but when I refresh the page that popup appears ? here's the code I use
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var popupWindow=null;
function popup(mypage,myname,w,h,pos,infocus){
if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.rando m()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=no,directories=no,status =no,menubar=no,toolbar=no,resizable=yes';popupWind ow=window.open('',myname,settings);
if(infocus=='front'){popupWindow.focus();popupWind ow.location=mypage;}
if(infocus=='back'){popupWindow.blur();popupWindow .location=mypage;popupWindow.blur();}
}
// -->
</script>
<body onUnload="popup('http://pageiuse.com','pagename','900','900','center','fro nt');">
|