Skip to content

Instantly share code, notes, and snippets.

@joshuaclayton
Created June 8, 2009 18:47
Show Gist options
  • Save joshuaclayton/125985 to your computer and use it in GitHub Desktop.
Save joshuaclayton/125985 to your computer and use it in GitHub Desktop.
$("form").each(function(idx, form) {
console.log("looping through forms");
var submitFunction = $(form).attr("onsubmit");
if(typeof(submitFunction) !== undefined) {
delete(form.onsubmit);
var anonymousSubmit = new Function(submitFunction);
$(form).submit(anonymousSubmit);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment