RE: Button id's - firefox and IE different ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx] 
Sent: 02 April 2009 12:45 PM
To: Richard Heyes
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  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@xxxxxxx>
To: "Angus Mann" <angusmann@xxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, April 02, 2009 8:17 PM
Subject: Re:  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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux