I have a validate function like this:
function submit_otp(){
var otp=jQuery('#otp').val();
jQuery.ajax({
url:'../../../Code_Verification/check_otp.php',
type:'post',
data:'otp='+otp,
success:function(result){
if(result=='yesFalse'){
jQuery('#otp_error').html('Please enter your valid code');
$("#button-next-3").attr("disabled", true);
}
if(result=='yesTrue'){
jQuery('#otp').html('Your code is correct');
}
if(result=='not_exist'){
jQuery('#otp_error').html('Please enter valid otp');
}
}
});
}
--> if the return is 'yesTrue' that's mean i can go to next page. But it's not working this is call function:
if(!submit_otp()){
return;
}else{
FrontendBook.updateConfirmFrame();
}
Question: how can i set up go to next page if the return is 'yesTrue'? Next page is: FrontendBook.updateConfirmFrame(); ==> it's not working when i moved FrontendBook.updateConfirmFrame(); where : jQuery('#otp').html('Your code is correct');