mrMike
mrMike

Reputation: 11

Open new tab in browser window (opened with window.open)

I have a new window opened via window.open method and in that window in content I have a link with "target=_blank".

When clicked the link opens new tab in parent window instead of the one that content was in. I also noticed that for that window (created with window.open) the Ctrl+T shortcut (to open blank tab, Firefox) does not work.

I checked window.open specs and I didn't find any option that would allow this behavior.

var a = window.open("http://www.google.pl", 
"Test",
"width=640,height=480,scrollbars=yes,toolbar=yes,menubar=no,location=no,resizable=yes"); 
a.focus();

Setting toolbar=yes makes it work in Firefox. Any idea how to make it work in chrome?

Upvotes: 1

Views: 4053

Answers (1)

Marcus Höglund
Marcus Höglund

Reputation: 16801

Could you show some code?

else; try with javascript:

function OpenNew(){ window.open("http://www.google.se", "_blank"); }

Rgds

Upvotes: 1

Related Questions