toastr.clear();
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": true,
"progressBar": false,
"positionClass": "toast-bottom-center",
"preventDuplicates": true,
"showDuration": "6000",
"hideDuration": "10000",
"timeOut": "3000",
"extendedTimeOut": "2000"
};
$(document).ready(function() {
$("#st_forgotform").submit(function(){
$("#st_forgotform button[type='submit']").html('Please wait');
$("#st_forgotform button[type='submit']").attr("disabled","true");
$.ajax({
url: "https://wbtcemp.in/forgot-username-action",
type: "POST",
data: new FormData($("#st_forgotform")[0]),
async: true,
contentType: false,
cache: false,
processData:false,
success: function(data) {
$("#st_forgotform button[type='submit']").html("Get User ID");
$("button[type='submit']").removeAttr("disabled");
if(data!=0)
{
toastr.success(" "+data);
$(".page-ath-text").removeClass("hide");
$(".ld_st").html(data);
$("#st_forgotform").addClass("hide");
}
else
{
$(".ld_st").html('');
toastr.warning(" Name and Mobile No. did not match.");
}
},
error: function(xhr, ajaxOptions, thrownError) {
$(".ld_st").html('');
toastr.error(' Failed! Something is wrong.');
$("#st_forgotform button[type='submit']").html("Get User ID");
$("#st_forgotform button[type='submit']").removeAttr("disabled");
}
});
return false;
});
});