javascript - Bootstrap Formwizard - Prevent to scroll to next step if each page form submitting ajax response gets error -


i using twitter bootstrap form wizard submit data on each page validation. want prevent, scroll next step if ajax response gets error while submitting data. below code,

'onnext': function(tab,navigation,index){     //scrollto('#wizard',-100);     if(index == 1){         var $valid = $('#register_form').valid();         if(!$valid){             $validator.focusinvalid();             return false;         }         else         {             var options = $('form[name=register_form]').find('input, textarea, select').filter('.fw1').serialize();             var data = options + '&step=1';             $.ajax({                 type: 'post',                 url: 'employeeentryprocess.php',                 data: data,                 success: function(data){                     this.show(2);                 },                 error: function(){                     return false;                 }             });         }     } }, 

thanks,

the way return false doesn't scroll next step automatically, , manually scrolling next step in success function of ajax request (so proceed if successful). may want put animation duration of ajax request otherwise nothing happening.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -