Need to execute client script on logout from the instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2018 11:49 PM
Hi,
I need to execute some client script on user clicks logout.
I am integrating an aws deployed application in the platform in iframe in UI pages. This application uses the user's session to login into it. After clicking the logout in the instance, if I am able to execute an ajax call from the client side to logout url of this application, that also gets logged out.
So, all I need to execute a client script on clicking the logout of the instance.
Can any one please help me on this. I am struck here since couple of days.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 07:44 AM
IF you need just the sessionid from sn, you could do this server side from a script action against the `logout` event as the "Instance ID" is the session ID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 10:51 AM
Yes, you are right. But I don't need the sessionId. All I need is to execute an ajax call(hit logout url of the application) from the client script to make sure user gets logout from the application on clicking the logout form the instance.
I just need to execute client script on clicking the logout on the instance.
Thank you so much for looking into it. I hope we will get a solution for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 10:57 AM
I don't know how you'd do that. I suppose you could add a global UI script if user is "guest" run this call. in a try catch. That would run on every page load where a user is unauthenticated. you could try to have it only run on page that url contains `logout.do` but all they need to do is press the stop button on the browser and it will stop running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2021 07:33 AM
Hi,
Can you try with these possiblities.
1) location.href='logout.do';
2) openFrameAPI.openCustomURL('logout.do');