[thelist] js popup images
Adam
adam at hallinteractive.com
Mon Apr 22 13:57:01 CDT 2002
first off-
wow Thank you for taking the time to help out- I learned more about js from
your emails than I could have screwing about on my own.
Many thx to the others who replied as well I'll look into the youngpup
script momentarily . For those who want to see the final version it is
below. mind the wrap!
I got it working and it's happening fine on all of my test browsers. I'm not
sure about the placement of the newWindow.document.write statement, even
though it's werking did I place this correctly?
Cheers and thanks!
var newWindow = null;
function subWin(url,wdth,hght){
var screenTop = (screen.height / 2) - (hght / 2);
var screenLeft = (screen.width / 2) - (wdth / 2);
var sHtml= ('<html><head><title>Larger Image</title><style
type="text/css"> body {margin: 0px; top:0px;
left:0px;}</style></head><body><img src="'+url+'"></body></html>');
if (newWindow && !newWindow.closed) {
newWindow.close();
}
newWindow =
window.open('','newWin','width='+wdth+',height='+hght+',top='+screenTop+',le
ft='+screenLeft+',screenY='+screenTop+' screenX='+screenLeft+',status=no,');
newWindow.document.write(sHtml);
if(!newWindow.opener) {
newWindow.opener = self;
}
newWindow.focus();
}
<a href="turnkey7/large/e_finishedsyst.jpg" onclick="subWin(this.href, 263,
400); return false;" title="Larger Picture">image</a>
Thx all!
Adam.
More information about the thelist
mailing list