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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can coordinated of an image submit be captured before the form is subm

Status
Not open for further replies.

roblasch

Programmer
Joined
Dec 30, 2000
Messages
168
Location
US
I am trying to capture a bunch of coordinates of an image before a form is submitted. It seems as though javascript doen't recognize the name.x and name.y values until after the form is submitted. Is this possible? When I use a standard submit button and do an alert before submitting for document.formname.inputname, it is an object. When I change the input type to image, it showns document.formname.inputname as undefined. Is this really the way it is? If so, how can I get the position of the coordinates with respect to an image?
 
Yup... capture onclick, then check event.offsetX and event.offsetY.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top