Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Window or New Tab -- Way to decide?

On a link, is there a way to specify whether the new _blank window is actually a new window or a new tab?

Thanks

like image 920
JD Isaacks Avatar asked Dec 07 '22 04:12

JD Isaacks


1 Answers

There is no garuanteed way to do this. You can, however, specify height and width for you new window. Doing this will force the link to open in a new window, and not a tab in most browsers.

window.open(url, windowName, height=400, width=400);

I would caution against doing this, however. Tabs vs. windows is a user preference for a reason.

like image 79
Karmic Coder Avatar answered Dec 26 '22 23:12

Karmic Coder