source: src/main/resources/static/js/logout.js

Last change on this file was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 11 months ago

Add entire code

  • Property mode set to 100755
File size: 476 bytes
Line 
1document.getElementById("logout").addEventListener("click", function(event){
2 $.ajax({
3 url: "http://localhost:8080/logout",
4 type:"POST",
5 data: "{}",
6 contentType:"application/json; charset=utf-8",
7 dataType: 'text',
8 success: function(succ){
9 alert( "Logout successful.");
10 window.location = "/login?logoutSuccessful";
11 },
12 error: function(err) {
13 alert(err);
14 }
15 });
16});
Note: See TracBrowser for help on using the repository browser.