Is there a way to force a page to open in a new window all the time regardless of the link used to open it? By adding something to the header perhaps? I know about target-"new" and window.open() but i want the page itself to always open as a new window with no toolbars or scrollbars shown even if the link used to open it is generic () with no target="new" or similar specified. I am only concerned with Internet explorer.
Thanks in advance.
I actually found a nice example here
here's the snippet (you might need to type this in a text editor and open that html file first because I don't seem to be getting it working on StackOverflow alone)
I hope this is what you are looking for.
<html>
<head>
<title>Opening Multiple Popup Windows</title>
<script language="javascript">
<!--//
function myPopup(url,windowname,w,h,x,y){
window.open(url,windowname,"resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=n o,width="+w+",height="+h+",left="+x+",top="+y+"");
console.log("Opening: " + windowname);
}
//-->
</script>
</head>
<body>
<!-- Inside the parenthesis the order goes URL, window name, width, height, position from left, position from top-->
<!-- Note that by giving each popup window a different name each page will open in a seperate popup window-->
<a href="javascript:myPopup('http://www.cnn.com', 'CNN','300','300','10','300')">Open popup 1</a>
<br>
<a href="javascript:myPopup('http://example.com', 'Example.com','300','300','100','300')">Open popup 2</a>
<br>
<a href="javascript:myPopup('http://www.nbc.com', 'NBC','300','300','200','500')">Open popup 3</a>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With