For some time ago, I heard that using the <button></button>
to submit a form, is not good - because IE submits the value of the button instead of the inputs in the form. Is this true.?
Because currently I'm working with bootstrap, and I have this login button, which should contain the arrow icon too. like:
<button type="submit" class="btn btn-primary" name="btnSubmit">
Login <i class="icon-arrow-right"></i>
</button>
I can't see how I should do it with a normal input button :/
Hope someone can answer this question!
Thank you guys!
It is only a problem if you need to have multiple submit buttons and differentiate between them on the server.
If you do and you need to support IE6 then you should avoid using <button>
elements, and they will all always be successful controls.
If you need to support IE7 (and possibly IE8) then you can give them unique names and test on the server to see which name appears in the data (while ignoring the value completely).
just use input. CSS-stylings work the same way for inputs. You cann also address the button with in your css:
.btn_primary input[type="submit"]
which works in gte ie6.
HTML
<input type="submit" name="btnSubmit" class="btn btn_primary" />