I am using a script to open a window with the full size picture when someone clicks the thumbnail. Easy enough, works great. This script I'm using opens a window to fit the dimensions of the image, however, it includes the full complement of browser accessories, i.e. menus, address line, scrollbars, etc. I'd prefer to have it open to the size of the image, with nothing but the title bar. Can I add something to this script that will do this, or do I need to use a totally different script. Here is what's in the head of the pop-up page:
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(600,600);
width = 600 - (document.body.clientWidth - document.images[0].width);
height = 600 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
And the body tag gets the "onload="fitWindowSize()".
Any suggestions would be appreciated.
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(600,600);
width = 600 - (document.body.clientWidth - document.images[0].width);
height = 600 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
And the body tag gets the "onload="fitWindowSize()".
Any suggestions would be appreciated.
Comment