hi, also try this but for me it isnt working.
http://stackoverflow.com/questions/1310378/determining-image-file-size-dimensions-via-javascript
i upload image, insert it on page through jquery and want to create div around inserted image, but dont know image dimensions.
$("#temp_image").html('<img src="uploads/obr1.jpg" alt="" id="tmp" />');
var img = document.getElementById('temp_image');
alert(img.clientWidth);
it show me 0, what is wrong ?
also tried:
var oImg = new Image();
oImg.src = 'uploads/obr1.jpg;
if (oImg.complete) {
alert(oImg.width)
}
it shows me 0 too.
where is problem ? thanks