Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

How to Pop a child window -- and close itself onblur?


10:46 pm on Jan 31, 2007 (gmt 0)

New User

10+ Year Member

joined:Nov 12, 2004
votes: 0

I've been having trouble getting this working ...

I've tried something like this but I'm having trouble with it in IE6

Here's the open window code.

<a onclick="window.open('/Portal/HelpPopup.aspx?section=UserHome','helpWindow','scrollbars=yes,width=775,height=525,resizable=yes');">

And here's the cloes window code.

<body ONBLUR="window.close();">

The problem is when I try to use the scrollbar of this child window, the window closes itself.

Any ideas?



7:39 pm on Feb 2, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2005
votes: 0

You just have got to love Internet Explorer don't you?

There is a workaround at [pro-thoughts.blogspot.com...]

That works if you have other items on the body that you want to play with, textboxes and text areas can also trigger this behavior. links as well. So either send their result to the parent or to a new blank window.

If the scrollbar is the only window element that you want to interact with then try this fix;


In IE this will trigger a close event on any click that is not on the scrollbar or the window's chrome.

Al Anderson


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members