This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes help with image coordinates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "help with image coordinates" Watch "help with image coordinates" New topic

help with image coordinates

Macij Nowak

Joined: May 24, 2012
Posts: 1
ok, so i have an image, lets say it is cow.
i have to make script which shows me information about after clicking on the part of the body, for example head. i have an array with body parts along with their coordinates in javascript (width, height and top/left position). how do i do it? onclick + switch?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60800

Why don't you just us an image map to begin with?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: help with image coordinates
Similar Threads
JLabel pan image
Frustrated with drawing shapes programmtically?
Getting coordinates on a image
Click on different part of Image.
Putting an image over another image at particular coordinates