RE: [PHP] Button id's - firefox and IE different ?
| From: | Leon du Plessis | Date: | Thu, 02 Apr 2009 11:27:17 +0000 |
| Subject: | RE: [PHP] Button id's - firefox and IE different ? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290963@lists.php.net to get a copy of this message | ||
Another suggestion would be to use the <Input> tag as suggested by Richard,
but rename the "name" value ie:
<input type="submit" name="btid1" value="Delete" />
<input type="submit" name="btid2" value="Delete" />
<input type="submit" name="btid3" value="Delete" />
You can then use your PHP variable $_POST["btid1"], $_POST["btid2"] or
$_POST["btid3"], etc, to determine relevant actions.
-----Original Message-----
From: Angus Mann [mailto:angusmann@pobox.com]
Sent: 02 April 2009 12:45 PM
To: Richard Heyes
Cc: php-general@lists.php.net
Subject: Re: [PHP] Button id's - firefox and IE different ?
I can do as you suggest below, but then the buttons are labelled "Delete"
"Cancel" and "Save" to the user.
The essential point is that they all need to say "Delete". I know I can
accomplish this by making multiple forms, each with its own button but for
my purpose that's a pain is the ***.
IE returns the text displayed in the button regardless of the "btid" value.
It seems to just ignore it.
Firefox returns the value assigned to "btid" as I intended regardless of the
text in the button that the user sees.
----- Original Message -----
From: "Richard Heyes" <richard@php.net>
To: "Angus Mann" <angusmann@pobox.com>
Cc: <php-general@lists.php.net>
Sent: Thursday, April 02, 2009 8:17 PM
Subject: Re: [PHP] Button id's - firefox and IE different ?
>> Any suggestions ?
>
> Try this:
>
> <input type="submit" name="btid" value="Delete" />
> <input type="submit" name="btid" value="Cancel" />
> <input type="submit" name="btid" value="Save" />
>
>
> And then you can check the value of $_POST['btid']. Oh and btw...
> <center>... seriously?
> That's so 9 years ago. ;-)
>
> --
> Richard Heyes
>
> HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
> http://www.rgraph.net (Updated March 28th)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php