Skip to content

Instantly share code, notes, and snippets.

@scottlaw1
Created January 2, 2015 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottlaw1/ca7996c4ce97453fa9d5 to your computer and use it in GitHub Desktop.
Save scottlaw1/ca7996c4ce97453fa9d5 to your computer and use it in GitHub Desktop.
Bad Form Submit vs Not Bad Form Submit
<!--BAD-->
<!-- The following button tag will submit the form named "formName" TWICE -->
<button type="submit" onclick="$('#formName').submit()">Assign</button>
<!--Not Bad-->
<!-- The following button tag will submit the form named "formName" ONCE -->
<button type="button" onclick="$('#formName').submit()">Assign</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment