Forum Moderators: open
I tried making a page with a Javascript that would open the Intranet and then close itself. Only trouble is the pop-up warning box about windows closing themselves.
Is there a way to redirect and resize a window with all the specifications I want?
Sorry this is long. I'm a total beginner.
I put my first attempt in incase that's of help.
<!--
function win() {
window.open("URL","","height=400,width=800,left=150,top=100,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
}
function winClose() {
self.close()
}
//-->
</script>
</head>
<body onLoad=win() onBlur=winClose()>
You can close a window using JavaScript without getting the security error only if that window was opened using javascript.
You can redirect using window.location.href and instead of opening a window, why not resize the current window using window.resizeTo(x,y) (where x is the horizontal size and y is the vertical size)?
One caveat about this method is that it's VERY annoying to the user! I would recommend that you allow the browser to be the size that it wants and allow the user ot resize it to the size that they want!
HTH