image as submit button

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi there,

I understood that input type="image" represents an image with submit
functionality, right?

This is the code of my two buttons:

<TD><input type="image" src="http://desktop/myisapi/last.jpg" value="Letzte
Frage" alt="[Letzte Frage]" name="bKnopf" title="Letzte Frage
<TD><input type="image" src="http://desktop/myisapi/next.jpg" value="Nächste
Frage" alt="[Nächste Frage]" name="bKnopf" title="Nächste Frage

As long as I have been using input type="submit", I was able to read out the
pressed button by reading the value of "bKnopf".

But after changing the input type to image and adding the src, this does not
longer work. What is the reason for this??

Thanks for any hint,


Re: image as submit button

Quoted text here. Click to load it

Yes and no. It has submit functionality, but different from that of a
normal submit button.

Quoted text here. Click to load it


Because browsers might not include a name=value pair from an image submit
button, just name.x=... and name.y=... pairs. It is debatable whether
they do the right thing here, but anyway, in practice, if you wish to use
two image submit buttons and distinguish between them, use different
name attributes for them, e.g., name="letzte" and name="nachste", and
test for the presence of a field like letzte.x or nachste.x in the form

More info:

Yucca, /
Pages about Web authoring:

Re: image as submit button

Gazing into my crystal ball I observed "Pascal Schmidt-Volkmar"

Quoted text here. Click to load it

You should also be getting coordinates of the images in question.  Have a
look at .  Note that
the name of the input element is appended by _ and the coordinates.  You
will have to test for that.

Adrienne Boswell
Please respond to the group so others can share

Site Timeline