Input (type=image) tag, forms, and image maps, Image Maps, Forms, Input Tag |
Input (type=image) tag, forms, and image maps, Image Maps, Forms, Input Tag |
gordonsowner |
Feb 12 2008, 06:03 PM
Post
#1
|
Group: Members Posts: 1 Joined: 12-February 08 Member No.: 4,948 |
Hi,
I have an image that is the src of an input tag, and that input tag is wrapped in a form tag. Normally, I can click on this image and the img.x and img.y coordinates are passed to a new page. However, along with sending this info, I want to overlay an image map that i use to trigger tooltips. I get the tooltip and, with an onClick attribute defined in the area tag of the map tag for the image map, I can trigger the form to submit when clicked. However, I loose the img.x and img.y attributes that were passed when i didn't overlay the image with an image map. I need these coordinates. Can someone tell me how to use a form/input(type=image) with an image map and still be able to submit the form with the coordinates clicked on the input tag's image? thanks, gordonsowner |
mike007 |
Feb 18 2008, 04:34 AM
Post
#2
|
Newbie Group: Members Posts: 10 Joined: 18-February 08 Member No.: 4,990 |
Hi, I have an image that is the src of an input tag, and that input tag is wrapped in a form tag. Normally, I can click on this image and the img.x and img.y coordinates are passed to a new page. However, along with sending this info, I want to overlay an image map that i use to trigger tooltips. I get the tooltip and, with an onClick attribute defined in the area tag of the map tag for the image map, I can trigger the form to submit when clicked. However, I loose the img.x and img.y attributes that were passed when i didn't overlay the image with an image map. I need these coordinates. Can someone tell me how to use a form/input(type=image) with an image map and still be able to submit the form with the coordinates clicked on the input tag's image? thanks, gordonsowner I use the <button></button> tag in a form when I want a image as background of my button. With this tag you dont need the x/y coordinates. You can ccs style this. This is a better solution cause it works in any browser. your solution will have lotsa problem in IE. greets http://www.finishedwebsites.nl |
Darin McGrew |
Feb 18 2008, 07:18 AM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
The button element is useless when JavaScript is disabled/unsupported. Normal submit buttons are more reliable.
For the original poster, AFAIK, there is no a way to combine the usability of a client-side image map with the delivery of x-y coordinates of a server-side image map or of a graphical submit button. |
bendecko |
Nov 21 2008, 10:30 AM
Post
#4
|
Group: Members Posts: 1 Joined: 21-November 08 Member No.: 7,160 |
|
Darin McGrew |
Nov 21 2008, 11:37 AM
Post
#5
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
bendecko, that page talks about client-side image maps and server-side image maps, but it doesn't talk about what gordonsowner asked for: a client-side image map that delivers x-y coordinates like a server-side image map.
|
Lo-Fi Version | Time is now: 28th March 2024 - 08:32 AM |