<button type="submit"> compatibility?
- by Mark
I'd like to have a submit button that submits a different value than is displayed on the button. With <input type="submit"> you can't seem to do this. With <button type="submit"> however, these can be two different values. The question is, will it work in all browsers?
Trying this test code here:
<form method="get" action="">
<input type="text" name="txt"/>
<button type="submit" name="btn" value="val">text</button>
</form>
In FF 3.6 it updates my address bar with both values appropriately (and responds to me pressing enter in the text box). In IE 8, it also accepts pressing enter, displays the text value in the address bar, but it show the button's value as a GET param at all... does that mean it's not submitting it?