Advertisement
Guest User

Untitled

a guest
Mar 13th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. $(function () {
  2. $('#logout_box').on('click', function (e) {
  3. $.ajax({
  4. type: 'post',
  5. url: 'logout.php',
  6. success: function ( msg ) {
  7. document.getElementById('response').innerHTML = msg;
  8. if(msg.includes("erfolgreich")){
  9. window.location.reload();
  10. }
  11. }
  12. });
  13. });
  14. });
  15.  
  16. $(function () {
  17. $('#loginform').on('submit', function (e) {
  18. e.preventDefault();
  19. $.ajax({
  20. type: 'post',
  21. url: 'logincheck.php',
  22. data: "username=" + document.getElementById("username_field").value + "&password=" + document.getElementById("password_field").value,
  23. success: function ( msg ) {
  24. document.getElementById('response').innerHTML = msg;
  25. if(msg.includes("Erfolgreich")){
  26. window.location.reload();
  27. }
  28. }
  29. });
  30. });
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement