General discussion

Locked

IE Window Properties.

By allpainful ·
Ok, i have a LOCAL page that when you open it it opens to a specific size via JavaScript
<script language="JavaScript"><!--
window.resizeTo(width,height);
//--></script>
I would like to change the windows properties as well (ex: toolbar=no)

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

IE Window Properties.

by ron.green In reply to IE Window Properties.

<html>
<head>
<SCRIPT LANGUAGE="Javascript">
<!--

var pageWin
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

function closeWin() {
if(pageWin && !newWin.closed) {
newWin.close()
}
}

function newPage(pageURL,w,h) {
winProps = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + w + ",height=" + h + ",top=100,left=100";
if (bName == "Microsoft Internet Explorer" && bVer >= 4 || bName == "Netscape" && bVer > 3){
NN3(pageURL,winProps)
} else if (bName == "Netscape" && bVer <= 3){
NN3(pageURL,winProps)
} else {
IE3(pageURL,winProps)
}
}

function NN3(pageURL) {
if(pageWin == null || pageWin.closed) {
pageWin = window.open(pageURL, "", winProps)
} else {
pageWin.close()
pageWin = window.open(pageURL, "", winProps)
}
}

function IE3(pageURL) {
pageWin = window.open(pageURL, "pageWin", winProps)
}

// -->
</SCRIPT>
</head>
<body>
<a href="javascript:newPage('http://www.w

Collapse -

IE Window Properties.

by allpainful In reply to IE Window Properties.
Collapse -

IE Window Properties.

by ron.green In reply to IE Window Properties.

And Continuing...
<body>
<script language="JavaScript">
<!--
var header="This Is The Top Of The Page<BR><HR>";
document.write(header); // -->
</script>
<a href="javascript:newPage('http://www.wherever.com./whatever.html',600,800)">Whatever</a>
<script language="JavaScript">
<!--
var header="<BR><HR>This Is The Bottom Of The Page";
document.write(header); // -->
</script>
</body>
</html>

(I use this quite often. Can't remember where I first got it. But I seem to recall that I had peared it down somewhat from more "comprehensive" code with a lot of variations for different browser implementations, etc.)

Collapse -

IE Window Properties.

by allpainful In reply to IE Window Properties.

NICE SCRIPT, VERY INTERESTING, NOW READ MY QUESTION AGAIN, LOCAL SCRIPT NEEDED TO OPEN WITH PROPERTIES. NOT LINKING TO THIS LOCAL PAGE, I KNOW A LOT EASIER WAY TO DO THAT THEN YOUR SCRIPT, LOCAL SCRIPT (DOUBLE CLICK TO OPEN) OPENS ITS SELF WITH THE RIGHT PROPERTIES.

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Software Forums