opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xul-talk@lists.sourceforge.net 9 October 2010 • 1:27AM -0400

[xul-interop] How to get image width?
by Tom Brito

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi!

I'm working with images, and if I don't specify an width and height to an
image it fits the exactly size of the image (didn't tested for images larger
then the screen).

What I would like to do is get the width of this loaded image, so I can
calculate to put it in the center of the screen with (screen/width/2 -
image.width/2),
any idea how to get loaded image's width?

Trying with:

var image = getElementById('loadingImage');


image.width returns nothing..


*
Wellington B. de Carvalho
*

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.