views:

596

answers:

5

Hey all..

I have a weird issue. I am opening a popup window in IE6 with SSL enabled on the server.

When the following executes it seems to lock the browser up. I know this is vague. This is the JScript that appears to be the problem. Gotta love your IE6!

function PopoffWindow(url) {
    var features = "height=400,width=550,top=60,left=100,"
                + "toolbar=no,location=no,menubar=no,status=no,"
                + "scrollbars=yes,resizable=yes";

    var win = window.open(url, "DSRocks", features);
    win.focus();
    return win;
}

This is not a problem in IE7 or Firefox. And the problem seems to be isolated to this server (with SSL). Anyone have any insight on this?

Thanks,

Nick

+1  A: 

Is it possible that the window.open call does not return quickly enough to allow you to perform a .focus() on it, in the next line?

What happens if you throw an alert() between those two lines?

crb
window.open() should block until it can return a valid reference to the new window. Even window.open(...).focus() shouldn't fail in IE6.
Grant Wagner
+1  A: 

have you tried assign the window a name? IE6 sometimes does funny things when you open an unnamed window. just add a "windowName", before the url

FailBoy
The window name is the second paramter in window.open(), in his case 'DSRocks'.
Grant Wagner
A: 

With a problem like this, it is usually best to get back to basics. A few things to check:

  • How are you testing IE6? Are you using the Microsoft Internet Explorer Application Compatibility VPC Image or some workstation install where you've managed to get IE6 and IE7 working on the same PC? Having both IE6 and IE7 on the same PC may appear to work, but lead to issues like you are seeing. Even if you are using an existing VPC Image, you may want to download (or extract from an existing download) a fresh copy and see if it happens on that copy of IE6.
  • Have you cleared the Temporary Internet Files, Cookies and History of the IE6 install? I know it sounds obvious and stupid, but perhaps a resource that is being loaded in the PopUp window is corrupt in cache, causing the problem.
  • Have you disabled every Add-on in IE6?

I think the first thing to determine is whether the problem is with every copy of IE6, or just your copy of IE6 (covered by the first bullet point).

Grant Wagner
A: 

Grant,

Thanks. But the problem is with all IE6 instances that are viewing the hosted site. I will try to add an alert before the focus() to see if this is the issue. As for the windowname.. that is the second parameter I am passing, "DSRocks".

Nick
A: 

The problem was with a JSON webservice call. Please see this link for details:

http://codeclimber.net.nz/archive/2006/12/22/How-to-enable-an-ASP.NET-WebService-to-listen-to-HTTP.aspx

Nick