Guest User

Untitled

a guest
Apr 26th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#restorepwdform").live("submit", function() {
  2.     var mail = encodeURIComponent($("#restorepwdform #mail").val());
  3.     $.ajax({
  4.         url:  siteurl+"ajax.php?act=profile&subact=restorepassword",
  5.         type: "POST",
  6.         data: "mail="+mail,
  7.         dataType: "json",
  8.         cache:  false,
  9.         beforeSend: function() {
  10.             $("#error").html("<img align=\"center\" src=\""+templateurl+"img/loader-white.gif\">");
  11.             errorPopup("#error");
  12.         },
  13.         error: function() {
  14.             $("#error").html("Неизвестная ошибка");
  15.             errorPopup("#error");
  16.             setTimeout(function(){
  17.                 $("#error").fadeOut(500);
  18.             }, 1500);
  19.         },
  20.         success:  function(response) {
  21.             $("#error").html(response.message);
  22.             errorPopup("#error");
  23.             setTimeout(function(){
  24.                 $("#error").fadeOut(500);
  25.             }, 1500);
  26.         }
  27.     });
  28.     return false;
  29. });
Add Comment
Please, Sign In to add comment