I use anchors as links, and I also bind an input / return key to submit the form, for example:
$("form[name!=smsform]").bind("keyup", function(e){ if(e.keyCode == 13){ $(this).submit(); }); $("a[title=submit]").click( function(){ $(this).parents("form").submit(); });
However, the form is submitted twice when you press Enter / Return using the code above, I need to combine the two fragments - does anyone know how to do this?
source share