views:

88

answers:

2

Hi guys.

I'm working on this project and I have to open a new browser tab. Actually, I have to open a target="_blank" link without the link. I know is not right to interfere with the user preferences, but hey, this is the project requirements.

So, long story short, i have to replicate the target="_blank" behavior only with javascript.

Is this even possible? Thanks!

+5  A: 
window.open('http://www.example.com','_blank')
S.Mark
This opens a new window. Most browsers open tabs instead but the behavior is configurable. There's no guarantee that a new tab will be opened.
lajuette
A: 

Have a look at this page, or just Google "javascript new window". HTH

Yuval