On 28 Jan., 22:28, Clifford Meece <
clifford.me...@gmail.com> wrote:
> Maybe popup the chat window with a jqueryui dialog. I believe it has an on close handler.
>
I assume you mean a dhtml window/layer... That is not an option
because this kind of window will disappear when the user goes to the
next page. I need something more permanent. Furthermore the browser
would have to re-initialize the chat all over again on every request.
But I may have found a solution... The docs say:
"Its important to understand that the onSubscribed callback can be
called even if you’ve never made a call to subscribe. This might be
because the web application decided to auto_subscribe you to some
channel, or it could be because the user is already logged in and
subscribed to multiple channels, though in a different browser window
or tab. If the subscribe call is made successfully in another tab,
then this tab’s Hookbox connection object will also issue an
onSubscribed callback."
So basically the above says that every open window knows about any
subscriptions. So know I've added
setInterval('checkToSeeIfChatIsStillOpen()',10000). This function will
look for the chat window. If it does not find it, any chats are
unsubscribed.
The trouble is, that the reference to the chat window is lost, if the
user navigates in the main window... So I am still stuck... But
wondering if I can use cookies in a clever way....
/marie_dk