Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 72708 invoked from network); 28 Nov 2004 17:04:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Nov 2004 17:04:34 -0000 Received: (qmail 23274 invoked by uid 500); 28 Nov 2004 17:04:32 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 23003 invoked by uid 500); 28 Nov 2004 17:04:31 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 22988 invoked by uid 99); 28 Nov 2004 17:04:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=CLICK_BELOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of joerg.heinicke@gmx.de designates 213.165.64.20 as permitted sender) Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 28 Nov 2004 09:04:30 -0800 Received: (qmail 9608 invoked by uid 65534); 28 Nov 2004 17:04:27 -0000 Received: from p50880303.dip0.t-ipconnect.de (EHLO [192.168.122.254]) (80.136.3.3) by mail.gmx.net (mp023) with SMTP; 28 Nov 2004 18:04:27 +0100 X-Authenticated: #3483660 Message-ID: <41AA056A.2060509@gmx.de> Date: Sun, 28 Nov 2004 18:05:46 +0100 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [OT] input type="image" request param names References: <41A9C5B4.2050908@gmx.de> <41A9E7CE.1070102@apache.org> In-Reply-To: <41A9E7CE.1070102@apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On 28.11.2004 15:59, Sylvain Wallez wrote: >> In our CForms Action.java [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 : >> 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. Makes sense. >> 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: > > > test > >
> > >
> > > > Clicking on the image leads me to > file://.../test-img.html?text=blah&img.x=42&img.y=36&img=Click > > So, where's the truth? Hmm, tested it without a value and got the impression Mozilla behaves like IE, but you are right, with a value img=Click is sent too. But - and this is at least inconsequent then - Mozilla does send a request param for a submit button if the button has no value. It does not do this for the image: test
@value=click: file://../test-img.html?button=click file://../test-img.html?img.x=105&img.y=84&img=click without @value: file://../test-img.html?button= file://../test-img.html?img.x=88&img.y=27 Joerg