(Note crosspost and follow-ups to ciwah.)
Nicolas Keller wrote in thread "Differences in form handling btw
Mozilla and IE?":
The problem: I'm using a form that submit's (POST) its data via three
different image buttons (depending on which button you click,
something different should happen):
<form action="id.php" method="post" name="form2">
<input name="id1" type="image" id="id1" value="id1" src="id1.gif">
<input name="id2" type="image" id="id2" value="id2" src="id2.gif">
<input name="id3" type="image" id="id3" value="id3" src="id3.gif">
</form>
(This is kind of a summary of the code!)
Eh, since I've moved this discussion to ciwah, I'll question whether
that summary involved removing alt attributes. :-)
Now while with Mozilla everything works perfect, the Internet Explorer
can't handle this: Not one of the variables id1, id2 or id3 is set in
the target script - but it is in Mozilla.
My interpretation of the HTML4.01 specification leads me to believe
that Internet Explorer behaves incorrectly [1]. The INPUT that's
used to submit a form *is* a successful control, which, by HTML
rules, means its control-name/current-value pair is included as part
of the form data set: "Every successful control has its control name
paired with its current value as part of the submitted form data set"
(HTML4.01, sec. 17.13.2).
By searching for previous comments, I came across:
http://www.cs.tut.fi/~jkorpela/forms...on.html#submit
J. Korpela says "the value of the VALUE attribute is ignored, and the
coordinates of the clicked location are passed instead". I can't
find where this is written in the specification. Section 17.4.1
states:
| The submitted data includes name.x=x-value and name.y=y-value where
| "name" is the value of the name attribute, and x-value and y-value
| are the x and y coordinate values, respectively.
So, the submitted data *includes* the coordinates of where the
pointing device was when it was used to submit the form [2]; the
spec. does not say the control-name/current-value pair of the image
submit button is not also included as part of the form data set. J.
Korpela then goes on to say that whether this information should be
included "is somewhat debatable and depends on the interpretation of
wordings in the specification". I cannot see why this is the case.
In the thread <http://groups.google.com/groups?th=e5f4dc91c1b1eda2>,
linked to by the above document, it's explained why an image submit
button's control-name/current-value pair should be submitted as part
of the form data set, and why browsers not doing so are in violation
of the specification. I agree with this conclusion.
On the other hand, A. Flavell's document:
http://ppewww.ph.gla.ac.uk/~flavell/www/trysub.html
says that "it would be unwise to try to rely on this behaviour, as
it's not in the specifications".
I'm confused. Is my interpretation wrong?
[1] What makes me think twice are the browsers that don't behave in
accordance with my interpretation (among others, no doubt): Opera
7.10, Opera 6.0, Opera 5.12, IE 6.0, Netscape 4.74.
[2] The exact words of the specification are: "When a pointing device
is used to click on the image...". Is there any reason why a
pointing device *must* click to activate something?
--
Jock