PHP Classes

File: account/assets/js/forgot.js

Recommend this page to a friend!
  Classes of Mohamed Elbahja   PHP Secure Login Library   account/assets/js/forgot.js   Download  
File: account/assets/js/forgot.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Secure Login Library
Login users and start sessions in a MySQL database
Author: By
Last change:
Date: 6 years ago
Size: 1,337 bytes


Class file image Download
$(document).ready(function() { $("#forgot").validate({ rules: { email: { required: true, email: true } }, submitHandler: function() { var data = $('#forgot').serialize(); $.ajax({ type: 'POST', url: 'submit/forgot.php', data: data, beforeSend: function() { $("#form-message").fadeOut('fast'); $("#btn-submit").html(' Sending... '); $("#btn-submit").attr('disabled', true); }, success: function(r) { if (r === 'success') { $("#btn-submit").remove(); $("#forgotdata").remove(); $(".alert").remove(); $("#form-message").html('<div class="alert btn-info"> please check your email </div>'); $("#form-message").show(); } else { $("#form-message").fadeIn(0, function() { $("#form-message").html('<div class="alert btn-danger"> ' + r + ' </div>'); $("#btn-submit").html(' Get new password'); $("#btn-submit").attr('disabled', false); }); } } }); return false; } }); });