Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulate onclick of an imagemap using javascript

Status
Not open for further replies.

AusTrem

Programmer
Dec 10, 2006
1
AU
Hi,

Does anyone know if it is possible to use javascript to process pixel coordinates of a point on an imagemap to simulate an onclick event, as if the user had clicked with the mouse at that location?
 
Set two additional hidden input to store the x and y coordinates. When simulate the click, write to the hidden boxes the desired x and y coordinate (in unit px) before calling the .submit(). On the server, read the hidden boxes x and y in case the image submit button does not return the anticipated (x,y) coordinate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top