modified function openPopup() to get the image window in focus again if
it was not closed before (code contributed by andrea http://project.antville.org/20020730/108447)
This commit is contained in:
parent
caa3f05e51
commit
bc7b0254e0
1 changed files with 11 additions and 7 deletions
|
@ -1,8 +1,12 @@
|
||||||
|
var imgWindow = "";
|
||||||
|
|
||||||
function openPopup(img, width, height) {
|
function openPopup(img, width, height) {
|
||||||
if (img && width && height) {
|
if (img && width && height) {
|
||||||
width = Math.min(width + 36, 640);
|
width = Math.min(width + 36, 640);
|
||||||
height = Math.min(height + 30, 480);
|
height = Math.min(height + 30, 480);
|
||||||
var popUp = window.open(img,"popUp","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + width + ",height=" + height);
|
if (imgWindow.location && !imgWindow.closed)
|
||||||
}
|
imgWindow.close();
|
||||||
return;
|
imgWindow = window.open(img, "imgWindow" + width + height, "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height);
|
||||||
}
|
imageWindow.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue