Can anyone tell me why Safari isn’t finding the width and height of my image.
External Javascript:
[CODE]
function cmdOpenWindow(image,subfolder){
var img = new Image();
var imgPath = “../Images/”;
if(subfolder!=””){
imgPath = imgPath + subfolder + “/” + image;
}
else{
imgPath = imgPath + image;
}
img.src = imgPath;
var width = [COLOR=”Red”]img.width[/COLOR] + 70;
var height = [COLOR=”red”]img.height [/COLOR]+ 90;
window.open(“/Pages/Images.asp?strImage=”+image+”&strSubfolder=”+subfolder, “_blank”, “toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=”+width+”, height=”+height);
}
HTML:
[CODE]
<img class=”ImageOpen” src=”../Images/Folder1/tTheTeam.jpg” alt=”” height=”54″ width=”72″ border=”0″ onclick=”cmdOpenWindow(‘TheTeam.jpg’,’Folder1′)” />