ShowUsYour<Blog>

Irregular expressions regularly

window.open delays

I've noticed in the past that, when calling window.open there is often quite a delay before a new window is created and opened in IE so, today I thought that I'd run a little test to see how long.  I created a page with nothing in it and added the following javascript

    window.attachEvent("onload", openPopUp) ;
    
    function openPopUp()
    {
        alert( "starting") ;
        var hWnd = window.open("about:blank", "foo") ;
    }

The result? 6 seconds elapsed between accepting the alert message and the new window appearing. What's more, I acheived identical results from 2 diferent PC's!

Posted: Oct 08 2003, 04:24 PM by digory | with 3 comment(s)
Filed under:

Comments

Andrew said:

I've also noticed this behavior,you can
use MyIE as alternative ;-)
# October 8, 2003 5:16 AM

Siegfried Weber said:

I've seen such behavior too, but only if I have a galore of IE windows open.
# October 8, 2003 5:26 PM

Kaskooye said:

I had the same problem, and just fixed it.
This occurs only when you give a name to your window : "foo" in your sample.

here's my workaround

function openPopUp()
{
alert( "starting") ;
var hWnd = window.open("about:blank", "") ;
}

Have a nice day
;-)

J.Philippe
# April 26, 2004 11:02 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)