Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

Handling Closed Web Browser Open Client Orphaned Session


3 replies to this topic

#1 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 240 posts
  • Gender:Male
  • Location:San Miguel de Allende, GTO, Mexico

Posted 11 August 2014 - 11:03 PM

Hi everyone,

I made a request to NGA a couple of months ago on how to deal with orphaned ProIV sessions if a user clicks the browser X button in OpenClient. Jamie Gibson replied with this solution and it works. I can't be the only person who has this problem so I want to share the solution on this forum.

Thanks Jamie!

Regards
Ross

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hi Ross,

I sat down with one of the developers this afternoon and we came up with the following option. It is not perfect, but we believe that it is the best option available right now, that doesn't require any code changes to our product.

In the Open Client file structure, we are expecting you to have created your own [resource] folder under the appResources folder, into which you put your own customisations. One of these would be an index.html file, which is commonly used to link to a custom css file, amongst other things. In this file, in the head section you can add the following code (replace square brackets with the normal angles, as they will get stripped from this email) :

[script language='javascript' ]
window.onbeforeunload=function(){
var message = {widgetID:"proiv_disconnect"};
OpenAjax.hub.publish("proiv.message.disconnect", message);
return "custom message";
};
[/script]


The result of this is when the user tries to close the window it will immediately terminate the PROIV kernel session, in the same way as if they had clicked the disconnect button on our toolbar. They will get prompted by a message to continue leaving the page or cancel, however the option is academic as the session will have already gone and if they choose to cancel they will need to connect a new session.

I hope this helps,

Regards,
-----------------------------------------
Jamie Gibson
Northgate Support Team Leader
NorthgateArinso | Peoplebuilding 2 | Maylands Avenue | Hemel Hempstead | HP2 4NW | UK 


#2 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 14 August 2014 - 01:33 PM

Thanks for the post Ross.

 

Were you ever able to resolve the supression of the academic message.


Things should be made as simple as possible, but not simpler

#3 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 240 posts
  • Gender:Male
  • Location:San Miguel de Allende, GTO, Mexico

Posted 14 August 2014 - 03:53 PM

Hi Darren,

 

No, I haven't bothered to try at this stage. I did change the default message to tell the user that their session was indeed dead already.

 

regards

Ross



#4 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 20 August 2014 - 06:58 AM

Thank you for sharing the script.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!