I browse for an image using form input type file and call a JavaScript
function with onchange.
I then want the function to check the image's properties (width, height,
filesize).
In WinIE, the following works:
var myimage = new Image();
myimage.src = fileID.value; // fileID is the form input type file ID, passed
to the function with getElementById( 'file')
alert(myimage.w idth); //gives the pixel width of the file (or height or
fileSize).
This does not work in Netscape or Safari.
How do obtain these properties in Netscape and Safari?
function with onchange.
I then want the function to check the image's properties (width, height,
filesize).
In WinIE, the following works:
var myimage = new Image();
myimage.src = fileID.value; // fileID is the form input type file ID, passed
to the function with getElementById( 'file')
alert(myimage.w idth); //gives the pixel width of the file (or height or
fileSize).
This does not work in Netscape or Safari.
How do obtain these properties in Netscape and Safari?
Comment