Re: Re: <button> tag
| From: | Richard Davey | Date: | Tue, 20 Apr 2004 08:57:07 +0000 |
| Subject: | Re: Re: <button> tag | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183951@lists.php.net to get a copy of this message | ||
Hello Richard,
Tuesday, April 20, 2004, 9:55:15 AM, you wrote:
RL> Acutally, I've just worked out why its not working:
Other than it not being valid HTML you mean? :)
RL> I have multiple <button> tags on the same page which all do different things
RL> (edit/delete/new...). They are all called 'submit' (name='submit') and
RL> have
RL> different 'value' values in order that the receiving script may distinguish
RL> between them:
RL> <button name='submit' value='edit'>Edit Item</button>
RL> <button name='submit' value='delete'>Delete Item</button>
RL> It seems that MSIE doesn't send the value of 'value' when the form is
RL> posted.
In all fairness to IE, it WILL send the value of each button - but PHP
cannot distinguish between them all because you have given them all
the same name! :)
RL> Does <input type='submit'...> allow this sort of functionality?
If it has a unique name, sure:
<input type="submit" name="something-unique">
Alternatively, if you need loads of buttons on a page, just use:
<input type="button" name="something-unique" ... >
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html