Not exactly. Try replacing this:
Code:
function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to default height
var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
window.open(path,"", winattributes)
}
with this:
Code:
var win = null;
function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
if(win&&!window.opera)
win.close()
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to default height
var winattributes="width="+actualWidth+",height="+actualHeight+",top=250,left=250,resizable"
win = window.open('','', winattributes)
win.document.write('<title>Close Window to Exit</title>');
win.document.write('<body bgcolor="#dddddd" text="#000000" style="margin:0;padding:0;overflow:hidden;">');
win.document.write('<img width="'+(actualWidth)+'" height="'+(actualHeight)+'" galleryimg="no" src="'+path+'" />');
win.document.close();
win.focus();
}
It is now only good for images though. Before, a page could be popped up as well. Refinements are possible.
Bookmarks