How to use <button type=button> |
[eluser]theprodigy[/eluser]
Quote:html5 way: You will need to play with it.InsiteFX: He said he was good with input type='submit'. He's trying to do it with button, not 'submit' button. He needs javascript, not css. Wondering Coder: You should be able to use something similar to Code: <script type="text/javascript"> Edit: it keeps taking away the onclick attribute, but you want to have onclick="submit_form('my_form')" inside the opening button tag.
[eluser]jayrulez[/eluser]
I think Code: <button type="submit">Click me</button> Edit note: http://www.w3schools.com/tags/att_button_type.asp apparently it doesn't work for IE... Well I'm not sure about the later versions like 8/9
[eluser]theprodigy[/eluser]
jayrulez, I'm not seeing on that page where it mentions that it doesn't work in IE? It says to always specify the type to override any defaults (IE="button", all others="submit"), but I don't see where it says it doesn't work in IE. Can you point me to it?
[eluser]jayrulez[/eluser]
[quote author="theprodigy" date="1306106810"]jayrulez, I'm not seeing on that page where it mentions that it doesn't work in IE? It says to always specify the type to override any defaults (IE="button", all others="submit"), but I don't see where it says it doesn't work in IE. Can you point me to it?[/quote] My mistake. I was just quickly browsing over it with my eyes and noticed "Internet Explorer" and assumed so
[eluser]theprodigy[/eluser]
heh, I understand completely. I had to read it twice to make sure I didn't miss it. I'm so used to reading "IE doesn't support [insert ANYTHING here]", that I thought I overlooked it.
[eluser]Wondering Coder[/eluser]
hehe, got it working. used type submit and add a hidden field in it. Code: <button type="submit"> & <input type="hidden">. Anyway I had to used image buttons that specifically used <button></button> type in my css file. thanks for the help!. ^_^
[eluser]theprodigy[/eluser]
if you wanted image buttons, why didn't you use Code: <input type="image" /> |
Welcome Guest, Not a member yet? Register Sign In |