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
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