form submits in FireFox when any button on page is clicked

Posted by RememberME on Stack Overflow See other posts from Stack Overflow or by RememberME
Published on 2010-03-19T22:03:45Z Indexed on 2010/03/19 22:11 UTC
Read the original article Hit count: 195

First time using Asp.net-mvc and originally followed the NerdDinner tutorial. My form submit button looks like this: <p> <input type="submit" value="Save" /> </p>

I've now added another button to the page with jQuery code attached. It works in IE, but when I test in FireFox the form submits. I tried adding another button, this time with no attached jQuery code and the same thing happens. When the button is clicked, the form submits.

<button id="random-button">Do Nothing</button>

??

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about firefox