[Javascript] Netscape 7.1, window.close()... sorry if this is a FAQ

Kenny Akridge kakridge at bellsouth.net
Fri Jan 23 22:04:58 CST 2004


Hello.. this is my first post to the list, so forgive me if I break a
rule.

I am pretty new to using javascript in a professional manner, so I need
a little help on something.

It seems pretty clear to me at this point that Netscape 7.1 will not
allow a window to be closed with window.close() if the window was not
opened by javascript.  That sounds good to me, and I believe that is a
W3C spec.

Here is my problem though.  I have a page, let's say x.html.  The page
has a script like this:

function LoginBrowser()
{
	
window.open("foo/login.aspx","LoginWindow","resizable=no,width=300,heigh
t=370,toolbar=no")
}

in my login.aspx file, I call this function with an onClick:

function refreshParent(url) {
window.opener.location.href = url;
if (window.opener.progressWindow) 
window.opener.progressWindow.close();
window.close();
}

Works fine in IE6 and Netscape 7.1 locally, but when I use SSL on NN
7.1, the window will not close.

Any suggestions?




More information about the Javascript mailing list