bug hunting and a (small) new set of widget code
[Evergreen.git] / Open-ILS / src / reporter / templates / logout.ttk
1 <script language='javascript'>
2
3         var COOKIE_SES = "ses";
4         var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
5
6         function doLogout() {
7
8                 var ses = cookie.get(COOKIE_SES);
9
10                 if(ses) {
11         var req = new RemoteRequest(
12                                 "open-ils.auth",
13                                 "open-ils.auth.session.remove", ses );
14         req.send(true);
15                 }
16
17    cookie.remove(COOKIE_SES);
18
19         location.href = location.href.replace( /(\?.*$)/, "" );
20
21 }
22
23 </script>
24
25