Imberi
05-24-2004, 04:19 PM
Hello I am using the following script to open weather radar images on my site. The script automatically resizes the window to the size of the image being dsplayed. The script works great, but I would like to remove the address bar and the menu bar from the new window. How can I use the 'menubar', 'location', 'toolbar' and 'scrollbar' properties with this script.
This was written by a friend of mine who has passed away, and I know nothing of how to add these properties. I would be very greatful of any help you can provide.
<html>
<head>
<meta http-equiv="Refresh" content="60">
<title>Sioux Falls Local Radar (Without Ground Clutter)</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
menubar = no;
window.resizeTo(width, height);
}
}
// End -->
</script>
</head>
<body onLoad="fitWindowSize()">
<div style="position:absolute; left:0px; top:0px">
<img src="http://66.28.250.180/data/nids/FSD19_anim_t.gif?t=1050455937" width="468" height="500">
</div>
</body>
</html>
This was written by a friend of mine who has passed away, and I know nothing of how to add these properties. I would be very greatful of any help you can provide.
<html>
<head>
<meta http-equiv="Refresh" content="60">
<title>Sioux Falls Local Radar (Without Ground Clutter)</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
menubar = no;
window.resizeTo(width, height);
}
}
// End -->
</script>
</head>
<body onLoad="fitWindowSize()">
<div style="position:absolute; left:0px; top:0px">
<img src="http://66.28.250.180/data/nids/FSD19_anim_t.gif?t=1050455937" width="468" height="500">
</div>
</body>
</html>