IE makes you suck again. I have the same problem with it. I have a form with multiple <button>some text</button> tags, like this: In-silico research (<button type="submit" name="removemethod" id="removemethod" value="3">-</button>),... In Firefox if I press the button, I get these post values: removemethod=3 In IE: removemethod=- So it always send the text between the <button></button> and not the value.
button is not a form tag that's why submitted value is inconsistant. If you need to have a form (submitting values), you should be using input type=button.
Comment
IE makes you suck again. I have the same problem with it. I have a form with multiple <button>some text</button> tags, like this:
In-silico research (<button type="submit" name="removemethod" id="removemethod" value="3">-</button>),...
In Firefox if I press the button, I get these post values:
removemethod=3
In IE:
removemethod=-
So it always send the text between the <button></button> and not the value.
Replies
Exactly. Perhaps it's not IE's fault but the <button> tag's fault. Either way, it can't be used.
The VALUE should always be the value submitted with the form. But IE submits the button text and ignores VALUE. So once again IE has it wrong.
button is not a form tag that's why submitted value is inconsistant. If you need to have a form (submitting values), you should be using input type=button.
Nothing in the HTML4/5 standard says elements that are not form elements can behave just how the browser wants.
there is no such thing as <button type="submit"> the thing you're looking for is <input type="submit">
actually it's just <button>, type="reset" is an option but type="submit" is a <button> elements default.