Advertisement
Guest User

Untitled

a guest
May 10th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. submitHandler: function () {
  2. /********* GET USER TOKEN WITH AJAX REQUEST**********/
  3. $.ajax({
  4. method: 'POST',
  5. url: "url for get token",
  6. data: {
  7. username: $('#email-log').val(),
  8. password: $('#password-log').val()
  9.  
  10. },
  11. success: function (response) {
  12. if(response.d == true) {
  13. localStorage["username"] = $('#username-log').val();
  14. localStorage["user_token"] = response['token'];
  15. window.location = "{{url_for('maps')}}";
  16. }
  17. },
  18. });
  19. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement