The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Input (type=image) tag, forms, and image maps, Image Maps, Forms, Input Tag
gordonsowner
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
mike007
post Feb 18 2008, 04:34 AM
Post #2


Newbie
*

Group: Members
Posts: 10
Joined: 18-February 08
Member No.: 4,990



QUOTE(gordonsowner @ Feb 13 2008, 12:03 AM) *

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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
bendecko
post Nov 21 2008, 10:30 AM
Post #4





Group: Members
Posts: 1
Joined: 21-November 08
Member No.: 7,160



It can be done!

http://www.howtocreate.co.uk/tutorials/html/imagemaps
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 08:32 AM