HighDots Forums  

window.opener.close() and Internet Explorer 6

Javascript JavaScript language (comp.lang.javascript)


Discuss window.opener.close() and Internet Explorer 6 in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Geoff Wilkins
 
Posts: n/a

Default window.opener.close() and Internet Explorer 6 - 04-03-2004 , 05:44 AM






I fear this may be a FAQ - in which case my apologies - but I've failed
to track the answer down.

I want to close a window from another window it opened. I assumed that

this.window.opener.close();

would work, and it does work with my Netscape 6; but my IE 6 gives me an
error-message, "this.window.opener is null or not an object".

Is there some code which will work with both browsers?

--
Best wishes,

Geoff Wilkins
GeoffW (AT) wordsmith (DOT) demon.co.uk

Reply With Quote
  #2  
Old   
mscir
 
Posts: n/a

Default Re: window.opener.close() and Internet Explorer 6 - 04-03-2004 , 06:23 AM






Geoff Wilkins wrote:

Quote:
I fear this may be a FAQ - in which case my apologies - but I've failed
to track the answer down.

I want to close a window from another window it opened. I assumed that

this.window.opener.close();

would work, and it does work with my Netscape 6; but my IE 6 gives me an
error-message, "this.window.opener is null or not an object".

Is there some code which will work with both browsers?
This works in my IE6 Netscape7:

window.opener.opener = top;
window.opener.close()

Found here;

http://www.quirksmode.org/js/croswin.html

Mike



Reply With Quote
  #3  
Old   
mscir
 
Posts: n/a

Default Re: window.opener.close() and Internet Explorer 6 - 04-03-2004 , 06:28 AM



mscir wrote:

Quote:
Geoff Wilkins wrote:

I fear this may be a FAQ - in which case my apologies - but I've
failed to track the answer down.

I want to close a window from another window it opened. I assumed that

this.window.opener.close();

would work, and it does work with my Netscape 6; but my IE 6 gives me
an error-message, "this.window.opener is null or not an object".

Is there some code which will work with both browsers?


This works in my IE6 Netscape7:

window.opener.opener = top;
window.opener.close()

Found here;

http://www.quirksmode.org/js/croswin.html

Mike
Sorry I goofed, that only works on my IE6.

Mike



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.