-
Featured Post from richyrich Preventing Form Submit with button element in Firefox
by on March 11th, 2009 at 09:17 AMI had an issue in Firefox where I wanted a <button> element to fire a Javascript function onclick.
However, I found in Firefox that the button also performed a submit on the form, which I didn't want.
After a little investigation I discovered that the default type for a button element is submit. Apparently a bug in IE prevents it from firing.
So, how to fix?
Add a type="button" property to your <button> element
...
0 Comments






Recent Comments