Question

how to stop page refresh on form submit in jQuery-Validation-Engine I'm using 4 tabs with each has different form, but on submit it should stay in same tab...

$('#AddPartnerSubmitBtn').live('click', function () { 
  var formvalidate; 
  formvalidate=$("#AddPartner").validationEngine("validate"); 
   if(formvalidate==1) { } 
 });
Was it helpful?

Solution

Use event.preventDefault

$('#AddPartnerSubmitBtn').live('click', function (event) { 

  // this will prevent the form from submitting 
  event.preventDefault();

  var formvalidate; 
  formvalidate=$("#AddPartner").validationEngine("validate"); 
  if(formvalidate==1) { } 
 });
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top