Forum Moderators: open

Message Too Old, No Replies

opening windows - popup blockers

SP2 mostly

         

natty

12:57 pm on May 16, 2005 (gmt 0)

10+ Year Member



hi there,

i am trying to popup a window in an onload.. nothing nasty i promise, but ofc, i am beset by sp2 and other popup blockers giving me trouble..

script im using is as follows


var windowHandle;
window.onload=function(){
popupWindow();
}
function popupWindow(){
windowHandle = window.open('<% =popupPath %>','popup','buttons=no,status=no,resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width=800,height=600,screenX=0,screenY=0,top=0,left=0,titlebar=no');
windowHandle.focus();
setTimeout('windowHandle.close()', 120000);
}
if(we are on a particular step of the process)
(windowHandle)?windowHandle.close():null;

now the problem appears to be, having set up the windowHandle var, to actually check that the window is alive i am finding a bit difficult.

FF happily does (windowHandle.document) whereas Ie doesnt seem to like this.
and a simple (windowHandle)? x:y; doesnt seem to give reliable results..

can anyone give me a reliable answer to checking for the presence of a poped up window that has, or has not, managed to actually pop up?

tia

nat

Bernard Marx

1:43 pm on May 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Long shot:

if(windowHandle && windowHandle.name=='popup')

natty

3:07 pm on May 16, 2005 (gmt 0)

10+ Year Member



hi bernard,

i am always happy to try long shots. (at this juncture anyhow) :-)

nat