Is there a way round this? Lets say I have a large image on a page, sized as a thumbnail, which I want to open in a new window at it's full size ...
The real height and width could be 300x500, but when I use the height and width properties of the image object passed to the openPic function, these return 90x130, i.e. what was set in the <IMG> tag.
Is there any way to get at the real height and width of the image ... or do I need a separate thumbnail image?
Greg.
Code:
<IMG SRC="myImage.jpg" HEIGHT="90" WIDTH="130" onClick="openPic(this);">
Code:
function openPic(img)
{
var iH=img.height; // I want these to return the actual size
var iW=img.width; // not the size set in the IMG tag
// more code follows to open & size the window, etc.
// but not relevant here
}
Greg.