Last change
on this file since 53765dd was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 9 months ago |
Add entire code
|
-
Property mode
set to
100755
|
File size:
476 bytes
|
Rev | Line | |
---|
[950fa0d] | 1 | document.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.