0

Using this below

window.open('aPage.aspx');

and i can open the page in a new Tab with every Browser, except Internet Explorer 8.

I see in this article How to open webpages in a new tab in internet explorer? that i can do this with 'target' attribute of tag 'a'.

I need to have this behavior when another page load. So i don't click on a link/button, the page on Tab will open automatically and i need to use javascript.

Any tips to get this work?

Community
  • 1
  • 1
user2195984
  • 33
  • 3
  • 8

2 Answers2

0

you may use window.load or jquery $(window).load(function () {}); and put your code inside the function. You may use window.open(url,'_blank'); as you mentioned

beebee
  • 280
  • 3
  • 18
0

As the answers to the example you posted suggest, you cannot change the settings of the browser. All you can do is add target="_blank" to links and window.open(url,'_blank'); to the javascript open. This will tell the browser to open in a new window but the browser will honor the user's preference setting to open in a new tab or window.

Miguel-F
  • 13,450
  • 6
  • 38
  • 63