I have an application that gets an image from the user's local machine. I need to check that the image is <= 2400px in any direction. To do this in the HTML, I've got:
<div style="display:none"><img id="phantom" src=""></div>
The javascript contains the following:
$('#attachment').change(function()
$('#phantom').attr("src",$('#attachment').val());
alert($('#phantom').clientWidth+" "+('#phantom').clientHeight);
});
All I get in the alert, however is, "undefined undefined".