Current Position:Home > Catching the browser close event...

Catching the browser close event...

Update:11-30Source: network consolidation
Advertisement
Hello Fellow Portal-Heads,
There's a nagging issue that I've been pondering (RE EP6 NW04).  In the MSS iViews there is the potential issue of a user viewing an employee and then closing the browser via the 'X' (vs. clicking the logoff link).  This 'X-ing' out of the browser leaves the viewed employee locked which is to be expected.  So... anyone have a good way to catch the 'X-ing' out of the browser and then trigger some code to perform a proper logoff?  I've tried inserting code in the masthead which catches a browser unonload() event... but it was not the smoothest operator.
Cheers,
Mike
Message was edited by: Mike Yang

The Best Answer

Advertisement
Hi Mike,
I have got a chance to work in a similar issue.The following code traps the 'X' of the browser and logoff the user.
<script type="text/javascript">
window.onunload = function unloadEvent()
     if (gIsPreviewMode)
          return;
     else
          if(window.screenLeft < 10004)
                 //this is refresh
          else
                 logoff();
</script>
Preview is taken care and the code is working fine. I am posting code so that somebody else can use it,
Regards
Message was edited by: Rem Swa
This is for EP6 SP2
  • Catching the browser close event... Update:11-30

    Hello Fellow Portal-Heads, There's a nagging issue that I've been pondering (RE EP6 NW04).  In the MSS iViews there is the potential issue of a user viewing an employee and then closing the browser via the 'X' (vs. clicking the logoff link).  This 'X

  • Call Webservice/API during browser close event Update:11-30

    Hello, I am using JDEV 11g. My application catches the browser close event to call a return Task Flow. I am wondering if its possible to call a webservice/API during the same event. Thanks PadmapriyaProbababy too late to ask .. did u manage to get th

  • How to catch browser close event excluding navigation events Update:11-30

    Hi, I tried using onBeforeUnload event and onUnload events.. but they are catching navigation events within the same site. Could you please let me know how I can catch browser close events without catching Navigation events? Thanks.Just set them to n

  • Catching browser close event and showing my own popup Update:11-30

    Hi, I want to show my own warning popup on browser close event. Kindly help me with the solution. Thanks a lot in advance. Lavanya.Lavanya, I don't think you could show a ADF Popup during the onload event. Instead, you could use javascript's confirm

  • How to catch IE7 tab change event in Java Applet? Update:11-30

    My applet have some modeless dialogs, When I start my applet with modeless dialog in tab1, if I swith to tab2, the modeless dialog of tab1 remains open. So I want to catch the tab change event, and set modeless dialog invisible when tab changes. Who

  • Why can not catch the standard BACK event in ALV's USER_COMMAND event, Update:11-30

    Hi expert, why i can not catch the standard BACK event in ALV's USER_COMMAND event, Code: DATA G_CON_UC_FORM   TYPE SLIS_FORMNAME VALUE 'F_USER_COMMAND', CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'     EXPORTING       I_CALLBACK_PROGRAM      = SY-REPID   

  • Portal session not being terminated. browser "unload" event Update:11-30

    This line of code is in the portallauncher.default and eventually causes the problem: EPCM.subscribeEvent("urn:com.sapportals.portal:browser", "unload", releaseProducerSessions); releaseProducerSessions eventually calls a portal compon

  • Photos, is it possible to browse by "EVENTS" like in iPhoto 08 Update:11-30

    Hello, the question is in the title : *For the pictures in the iPod Touch, is it possible to browse by "EVENTS" like in iPhoto 08* Thanks à lot.I presume iPhoto 08 Events haven't been implemented on the new iPods because the majority of iPod own

  • Browser Close Event Update:11-30

    Hi, I want to track Browser close event in EP to close all the sessions of the user. Plz guide me with detailed steps. Thanks in advance. Regards, PriyaHi search for "Browser close event" in google. Result: there is no such thing. You can do som

  • Browser invoke event startup order Update:11-30

    Hi. We have an application that gets installed with badge and also configured over badge. The badge sends some arguments with the instalation and the application generates its config file if it does not exist. This worked great, but now we had to mak