Hi,
i am trying to open a second popup from a parent popup when the user leaves it.
Works in IE but not in Netscape. The Js console returns this message:
JavaScript Error: illegal URL method 'news.htm'
Here is my code:
<SCRIPT LANGUAGE="JavaScript">
<!--
var exwin=null;
function News(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
if(window.screen)if(isCenter)if(isCenter=="true"
var myLeft = (screen.width-myWidth)/2+255;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
if(exwin!=null)exwin.close();
window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
//-->
</SCRIPT>
</HEAD>
<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"
ONLOAD="setTimeout('window.close()',40000)"
ONUNLOAD="javascript:News('news.htm','news','','207','300','true')">
(...)
If you do the news function in onload it works just fine.
But doesn't work in onunload ?
Any help is welcomed !
Thanks for your incomming messages.
Hablablow.