[Javascript] dimensions dinamic image

Peter Brunone peter at brunone.com
Mon Jan 16 12:53:52 CST 2006


If you can use a COM object, then I suggest the free ImageSize control from ServerObjects.com: 

http://www.serverobjects.com/products.htm
(scroll to the bottom)

If you just want the image to display as its normal size, don't put width and height in the tag:

 <%do while not rs.eof%>   

<img border= "0"  src= " <%=rs("imagen")%> " >   
<%rs.movenext%>   <%loop%>   
Cheers,

Peter

 From: Muñoz Peñaloza Carlos Alberto cmunozp at indap.cl

 hi, i unknow its dimensions!!!, every image have dimensions different     how i calculate the size of each image?     ej:     <%do while not rs.eof%>   

<img border= "0"  src= " <%=rs("imagen")%> "  width= "???" height= "???">             
<%rs.movenext%>   <%loop%>       [Muñoz Peñaloza Carlos Alberto]  
De: javascript-bounces at LaTech.edu En nombre de Peter Brunone

   How do you get the dimensions of the image?  If you find them in your ASP code, then you can put the width and height in just as you would do with the src attribute.  Also, if you do not put the dimensions in at all, the image will default to its actual size.

Regards,

Peter

 From: Muñoz Peñaloza Carlos Alberto cmunozp at indap.cl

Hello to all, I have the following problem, I want to assign the dimensions to him of an image in dinamica form, is to say I have an image and desconosco its dimensions, then I need to assign them to it.     

ej:   

<img border= "0"  src= " <%=image1%> "  width= "this.width"  height= "this.height" >           
<img border= "0"  src= " <%=image2%> "  width= "this.width"  height= "this.height" >           
<img border= "0"  src= " <%=image3%> "  width= "this.width"  height= "this.height" >            

greetings and thanks  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060116/46ce5be7/attachment.htm>


More information about the Javascript mailing list