|
Posted by Kimmo Laine on 07/11/06 09:59
"Mark Woodward" <markonlinux@internode.on.net> wrote in message
news:pan.2006.07.10.11.12.12.710395@internode.on.net...
> Hi all,
>
> I'm trying to set up a 'control panel' consisting of a table of icons.
>
> The early stages: http://www.deepinit.com/controlcentre.php
>
> Each of these is set up like:
>
> <td>
> <input type="image" id="addnews" src="/Image/add24.png"
> name="addnews" value="addnews" width="24" height="24"><br />
> <label for="addnews">Add News Item</label><br />
> </td>
>
> This is all taking place in a html form and I'm using input
> type="image"... like 'submit' buttons.
>
> Is this a 'good' approach?
>
> I'm trying to handle the $_POST variable after a user clicks on one of
> these but there are differences between firefox and ie6.
>
> Using:
> foreach ($_POST as $key=>$val) {
> echo $key ."|". $val . "<br />";
> }
>
> ie6 is only listing
> addnews_x|8
> addnews_y|17
>
>
> Firefox:
> addnews_x|10
> addnews_y|13
> addnews|addnews
>
> Why am I getting x and y co-ordinates?
>
> Why in firefox do I get $val ('addnews|addnews') but not in ie6?
"Creates a graphical submit button. The value of the src attribute specifies
the URI of the image that will decorate the button. For accessibility
reasons, authors should provide alternate text for the image via the alt
attribute.
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." From:
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.4.1
Note that php will convert name.x to name_x and name_y since period is
invalid in variable name.
What I'd like to know is what happens in IE if images are disabled or
non-existing image uri is given, and form is submitted by clicking the image
input which is converted to normal submit button, is the actual name then
provided? Are the coordinates (0,0) provided?
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|