Hi,
I dont think it is possible for javascript to measure the dimensions of an image. Here is an alternative way you could do it:
Code:
<script language="Javascript">
<!--
function openPic(pic,width,height){
newWin=window.open('','ImageWin','width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
newWin.document.open();
newWin.document.write('<html><head><title>Full Image<title></head><body><div align="center" valign="center"><center><img src="'+pic+'"></center><br><br><center><a href="javascript:self.close()"><font face="verdana">Close Window</font></a></center></div></body></html>');
newWin.document.close();
}
//-->
</script>
And then you would like to the image using:
<a href="javascript:openPic('image.gif','width','height')">
so for example if you image was called phil-man.gif you could link to it using:
<a href="javascript:openPic('phil-man.gif,'300','400')">.
You would obviously need to have the opup slightly bigger than the image to fit in the border and the close link
<Edited by Fletch on 01-28-2001 at 10:45 AM>
Bookmarks