patch: image input data submission
For image inputs, the dillo1 code would send name=value name.x=x-coord name.y=y-coord When I was getting this working for dillo2, I was uncertain whether name=value should be in there (http://lists.auriga.wearlab.de/pipermail/dillo-dev/2008-April/004085.html). I saw that firefox didn't send it, but I left it alone, since including it shouldn't hurt anything. I later saw that it was clearer in html3.2: "The x and y values of the location clicked are passed to the server: In the submitted data, image fields are included as two name/value pairs. The names are derived by taking the name of the field and appending ".x" for the x value, and ".y" for the y value." and just as clear as day in "web forms 2.0": "Image buttons, during this step, must be handled as if they were two controls, one with the control's name with .x appended, whose value is the x coordinate selected by the user, and the other with the control's name with .y appended, whose value is the y coordinate selected by the user. If the control's name is the empty string (e.g. if the name attribute is omitted) then the names x and y must be used instead." So I'll sneak in a patch before Jeremy gets back to form cleanup. (All that actually changes in buildQueryData() is that the DILLO_HTML_INPUT_IMAGE case goes up above Html_get_input_values() )
On Sat, Jun 07, 2008 at 11:59:00PM +0000, corvid wrote:
For image inputs, the dillo1 code would send name=value name.x=x-coord name.y=y-coord
When I was getting this working for dillo2, I was uncertain whether name=value should be in there (http://lists.auriga.wearlab.de/pipermail/dillo-dev/2008-April/004085.html). I saw that firefox didn't send it, but I left it alone, since including it shouldn't hurt anything.
I later saw that it was clearer in html3.2: "The x and y values of the location clicked are passed to the server: In the submitted data, image fields are included as two name/value pairs. The names are derived by taking the name of the field and appending ".x" for the x value, and ".y" for the y value."
and just as clear as day in "web forms 2.0": "Image buttons, during this step, must be handled as if they were two controls, one with the control's name with .x appended, whose value is the x coordinate selected by the user, and the other with the control's name with .y appended, whose value is the y coordinate selected by the user. If the control's name is the empty string (e.g. if the name attribute is omitted) then the names x and y must be used instead."
So I'll sneak in a patch before Jeremy gets back to form cleanup. (All that actually changes in buildQueryData() is that the DILLO_HTML_INPUT_IMAGE case goes up above Html_get_input_values() )
Committed. -- Cheers Jorge.-
participants (2)
-
corvid@lavabit.com
-
jcid@dillo.org