Attention: We are retiring the ASP.NET Community Blogs. Learn more >

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!

3 Comments

  • I've also noticed this behavior,you can

    use MyIE as alternative ;-)

  • I've seen such behavior too, but only if I have a galore of IE windows open.

  • 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

Comments have been disabled for this content.