Tutorial 13: Giving Form to Forms - HTML with Style | 6
Graphical submit buttons are similar to normal submit buttons, but instead of using a button as the control, they use an image that the author can specify. To submit the form, the user clicks on the button. This works similarly to a server-side image map (which, as you can now see, is a primitive type of form), in that it creates two name-value pairs: One with the control name followed by .x and using the x-coordinate of the user's click as the value, and another with the control name followed by .y and the y-coordinate as the value.
As you can see, this creates a few problems for users who can't view images on their screens. There are several ways around this: First, you must supply a text description via the ALT attribute, just like you do with IMG elements. Second, the form could have a default behaviour if no coordinates are given. You can associate a client-side image map with a graphical submit button via the USEMAP attribute, but this is currently unsupported by browsers, and the specification is not very clear on what the expected behavior is.
<FORM ACTION="/cgi-bin/html/formdump.cgi" METHOD="GET" ENCTYPE="application/x-www-form-urlencoded"> <P>First name: <INPUT TYPE="text" NAME="firstname" SIZE="10"> Last name: <INPUT TYPE="text" NAME="lastname" SIZE="10"> <P>Select a shape:<BR> <INPUT TYPE="image" NAME="shapes" SRC="example1.gif" ALT="Three shapes to choose from"> </FORM>
Produced by Stephanos Piperoglou
Created: May 28, 1998
Revised: February 25, 1999