Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get *.jpg Height and Width

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
Hi,

I need to get an image's height and width via a VBScript.

Any ideas?

I've got a page that picks random images every time a user logs on, but the images are all of a slightly different dimension, so I need to adjust the <img...> values accordingly.

Thanks,

Rougy

-----
The death of dogma is the birth of reason.
 
I found this after doing a few more searches:

<script language=&quot;vbscript&quot;>
Dim intWidth, intHeight
intWidth = document.image.width
intHeight = document.image.height
alert(&quot;VBScript=&quot; & intWidth & &quot;,&quot; & intHeight)
</script>

Will give it a try.

-----
The death of dogma is the birth of reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top