Guest User

Untitled

a guest
Nov 22nd, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. if ($('#inPrefPass').val().length > 5) {
  2. $.ajax('welcome/validate_user', {
  3. async: false,
  4. type: 'POST',
  5. data: {
  6. username: UserData.userName,
  7. password: $('#inPrefPass').val()
  8. },
  9. success: function (json) {
  10. json = $.parseJSON(json);
  11. if (json.success === 0) { // Handle failure
  12. loader.fadeOut();
  13. self.props.element.children.show();
  14. return false; // Will this return to '//handle success' ??
  15. }
  16. else break; // Success was good, carry out
  17. }
  18. }); //end ajax
  19. // handle successful validation
  20. }
Add Comment
Please, Sign In to add comment