how can i get x and y coordinate on some image. what i actually want to do is, whenever i click on some image, on a web page, my servlet or jsp on the web server will catch that coordinate and then, do something with it.
if you put it in a FORM tag, the x and y coords that were clicked will be pased back as x and y Dave
Joined: Aug 16, 2001
sorry about posting on two different forum.. i'm just fot sure where to put it.... anyway about the code:
what if, i don't know the image's width and height, can i still use it?... and, how actually i get the coordinate from the servlet. can i use the normal request.getParamater(???)?... or, there is some way else?... thanks....
It is better to include the image height and width if you know it since the browser can show the image more efficiently, but no, it isn't actually required. To test how to get the data back, if you write a simple page like this:
Then see what gets passed to the servlet, you will find that the parameters are 'x' and 'y'. Dave
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com