javascript - e.preventDefault(); & then continue to submit and post form -


ok firefox not letting registering onclick event...so have use e.preventdefault(); problem submitting (post) vars form , result page cannot continue reload.....

how can work around this?

$(document).ready(function(){          $( "#submit" ).click(function(e)  {                e.preventdefault();               $.post()                       .done(function( data ) {  //here need disable  e.preventdefault(); , carry on & post submission normal....                      });           });      })

try this:

.done(function( data ) {     $('#formid').submit();  // submit form halted e.preventdefault(); });  

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -