jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Image Construction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Image Construction" Watch "Image Construction" New topic

Image Construction

Sanjay Mohanty

Joined: Sep 12, 2009
Posts: 5

I have a image displayed in browser inside div element. Now I want to read the height, width and pixels of that image on click of a button.

Please suggest.

Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
This is not something you would do with a servlet. JavaScript is more suitable for this sort of thing.

So much trouble in the world -- Bob Marley
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I guess you are using an Image Tag inside the Div , now you can using javascript Dom API .

i would suggest you to go google with access javascript dom image properties

Save India From Corruption - Anna Hazare.
I agree. Here's the link: http://aspose.com/file-tools
subject: Image Construction
It's not a secret anymore!