I have an idea and I need to see if this is going to be possible.
I have an image displayed and I want that when the mouse moves over the image, I get a small square div follows my mouse around the image. That part I can do.
When I click on the image, I need to feed some data back to a servlet to crop that section of the image. I got the server side stuff down. What I am wondering is, when I click the mouse, am I going to be able to get somewhat accurate cooridates on the image itself to do a decent crop?
You can get the mouse position, and get the position of the image on the page and subtract the two from each other andget the position relative to the image so you can get the numbers. Probably will not be accurate to the exact pixel, but will be close.