views:

71

answers:

2

Currently, under IE8 and in IE7, using javascript window.open and target param is set to _blank, and while (Always open pop-ups in new tab) is checked, the pop up will open in new tab.

Is there a way to force the new pop up to open in a new window from javascript? Is there a solution other than javascript?

Thanks

A: 

Nope. It's a user setting that you can't override from script on the page. This is by design.

You could try using an HTML dialog instead if you truly need a dialog type experience.

jeffamaphone
Thanks. In this sense, is there a way to know whether the user had checked this setting or not?
habankoo
Not from Javascript, no. Though I guess you could try to play games with checking the offsetWidth of the document... if it's the same as the parent, then it's probably a new tab? May not be true on IE6 though.
jeffamaphone
A: 

This is possible if you pass the height and width parameters with your window.open() function.

Check the documentation for window.open()

anand
It won't work, tested the following:window.open("http://stackoverflow.com","test","width=350,height=250");Is that what you meant?
habankoo
Works fine on my machine with ie7.
anand
Was "Always open pop-ups in new tab" selected in Tools/Internet Options/Tab Settings? I tested it in both IE7 and IE8 and it won't work
habankoo