Forum Moderators: open
I imagine this is standard javascript behavior - clicking on "Back" button resets existing javascript state and breaks the IM session.
Even preventing the "Back" click with a javascript pop-up does not work. While the user receives a js alert and has a choice to remain on the previous page - it still re-sets the javascript state and the IM session is lost. The same problem also arises when a user wants to closing the browser. We can generate a pop up, but cannot preserve the existing session.
Does anyone have any suggestions on how to tackle this? Is there a way to deal with this in javascript or flash?
window.onbeforeunload = function()
{
if(VAR.nIHC.person.jT.chatMode=="publisher-chat")
{
window.event.returnValue = "Your current chat session will terminate.";
}
};
//for Firefox
//window.onbeforeunload = function() {return("Your current chat session will terminate.");}