cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture the logout event of the portal in the service

Former Member
0 Kudos

hi,

I want to capture the logout event of the Portal ( when the logout link on the portal is clicked) in my service.

How shall i do it?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can use AJAX to make call to your component along with the standard Logoff functionality.

For e.g. add one more JS function to call your component asynchoronusly. Do all the login in your component and along side the standard logoff component will be called too..

Its like making 2 requests from the browser when he clicks logoff OK.

Here is a sample AJAX call

  var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();

    http.open('get', '/irj/portal/......');
    http.onreadystatechange = handleResponse;
    http.send(null);
}