<script language="javascript" type="text/javascript"> ns4=document.layers ie8=document.all ns6=document.getElementById&&!document.all var xWin=null; var ticks=6; function ChangeLabel0(txt){ if(ns4){document.layers.label0.innerHTML=txt} if(ie8){document.all.label0.innerHTML=txt} if(ns6){document.getElementById("label0").innerHTML=txt} } function StartT(){ StartPopup(); window.focus(); ChangeLabel0("<b>Popup window appears in "+ticks+" sec. Wait please...</b>"); } function StartPopup(){ xWin=window.open("popuptest.htm","",""); alert('xWin ' +xWin); setTimeout("test_xWin()",700); } function test_xWin(){ // alert("typeof(xWin)="+typeof(xWin)); // alert("typeof(xWin.location.href)="+typeof(xWin.location.href)); // alert("xWin="+xWin); // alert("xWin.location.hash="+xWin.location.hash); if ( (xWin==null)||(typeof(xWin)=="undefined") ||(typeof(xWin.location.hash)!="string") // ||(xWin.location.hash!="#abc") ){sMsg="<font color=#FF0000><b>A popup killer is detected</b></font>";} else{sMsg="<font color=#008000><b>There is NO popup killer detected</b></font>";}; //alert("xWin="+xWin+" type="+typeof(xWin)+" typeloc="+typeof(xWin.location.hash)+" hash="+xWin.location.hash); window.focus(); ChangeLabel0(sMsg); } function hi() { alert('hi'); StartT(); return false; } </script> </head> <body onload="return hi();" > <form id="form1" runat="server"> <div id="label0"></div> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)