Popup Window in IE6: Window appears behind or below the main or parent window

I’ve been trying to open a popup window on selecting an item from a ComboBox in ExtJS and on opening the window, using


the popup would start loading and then quickly move below the current page. The behavior i observed only happened in IE6, Firefox loaded the popup fine and it stayed on top. With a bit of research and debugging on my own, i came to find out that something in the ExtJS code was causing the focus to return the <body> element of the main page. The solution to the problem?

//Function to open the Window
openDelegateWindow= function()
var popup = window.open( "qantume.htm", "Selector", "alwaysRaised=yes, status=0, height=300, width=650, resizable=0" );
 if (window.focus)
 return false;

//Function  calls for opening the window in your code
setTimeout(openDelegateWindow()', 100);

By delaying the start of the openDelegateWindow code, i am figuring the code execution has enough time to return the focus to the <body> tag, and then the open popup window can start uninterrupted and keep the focus on the popup window.

For your reference also i have found this script, which is helpful in making your popup quasi modal in that it checks the focus to make sure that it is not away from the current popup window, unless the focus is on one of the controls within the popup window. If the focus is anywhere else, it is rendered back to the popup window, making it basically stay on top until the user closes it. This is not foolproof, there are ways around, but they are really for the “I really need to break your script” type of user, as explained by the author. You can find it here:



Published by Abou Kone

I am a front end architect with 10+ years of experience in web development. The best part of the process for me is converting ideas into code and solving the technical problems that come along. Alongside providing technical leadership and architectural support to projects spanning multiple industries, I am also experienced in leading discussions with designers, developers, and business stakeholders helping to guide teams in turning complex business workflows or data into easy-to-use web and mobile interfaces. I believe in delivering high quality products and am constantly looking into improving the process and tools use to achieve this goal.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: