Get image height after DXImageTransform.Microsoft.AlphaImageLoader

I need to display the Images selected in the File Download application before sending to the page.

Here is my code

CSS

.upld { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image); } 

HTML

  <input type='file' onchange="getIt(this,'divImgTop1')" /> <br /> <div class="upld" id="divImgTop1"></div> 

Javascript

 function getIt(t,id) { var divShw = document.getElementById(id); divShw.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = t.value; divShw.style.width = "100px"; divShw.style.height = "100px"; } 

The code works fine and the image is displayed.

Question How can I find the height of the displayed image?

0
source share
1 answer

we only need to do position:absolute on each div

then

 $('#divImgTop1').height() 

will give the image height :)

0
source

All Articles