Javascript – Open page using new tab in chrome by javascript


I'm working on ASP.NET Webform along with C#. I'm trying to open up page in new tab using,"_blank"). It's working fine in Mozilla but in the chrome, It opens in new window.

Note : I'm calling by using Page.ClientScript.RegisterStartUpScript.

How to open this page using new tab in chrome?

Best Solution

The code is OK, but it will only open in a new tab if the action is triggered by the user otherwise chrome launches a new browser window. This behavior can be configured in chrome preferences. A example of this is the fiddle of Jordy, the example opens a new tab when you push the button "go!" but if you launch the code from chrome inspector's console it opens a new instance of the browser.