cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [OT] input type="image" request param names
Date Sun, 28 Nov 2004 14:59:26 GMT
Joerg Heinicke wrote:

> In our CForms [1] there is a comment about an IE bug with 
> appending 'x' and 'y' to the name of the input field when it is of 
> type image:
> Special workaround an IE bug for <input type="image" name="foo"> :
> in that case, IE only sends "foo.x" and "foo.y" and not "foo" whereas 
> standards-compliant browsers such as Mozilla do send the "foo" parameter.
> 1. I "found out" IE *is* standards compliant [2]:
> When a pointing device is used to click on the image, the form is 
> submitted and the click coordinates passed to the server. The x value 
> is measured in pixels from the left of the image, and the y value in 
> pixels from the top of the image. 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.

Well, what's the meaning of "the submitted data *includes* name.x..."?

The paragraph above that one says it "creates a graphical submit 
button". Following the "submit button" link says that it "submits a 
form" which in turns links us to the "Form submission" paragraph [3], 
where "Successful controls" says that "every successful control has its 
control name paired with its current value as part of the submitted form 
data set" and that "If a form contains more than one submit button, only 
the activated submit button is successful."

So, my interpretation is that clicking an input of type image makes it a 
successful control and that therefore its name/value pair should be 
sent, and that *additionally* the x and y coordinates should be included.

> 2. My Mozilla 1.7 behaves the same way, both in quirks and standards 
> compliance mode.

Uh? I initially tested image inputs with no problems with Mozilla and 
then added this workaround after testing with IE.

I just made a quick test with Firefox 1.0 on my Mac, and it does send 
the input name also:

  <form action="test-img.html" method="GET">
    <input name="text"/>
    <input type="image" src="pic.jpg" name="img" value="Click"/>

Clicking on the image leads me to 

So, where's the truth?


> [1] 

> [2]


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message