Close messenger once the ChatSystem has been stopped

Last post 07-01-2009, 12:28 PM by Reivax. 4 replies.
Sort Posts: Previous Next
  •  06-30-2009, 12:29 PM 53644

    Close messenger once the ChatSystem has been stopped

    Exist some way (method or javascript function) to can close the messenger after the user logout and the method “CuteChat.ChatSystem.Stop()” has been call it.

    One alternative could be add some type of validation into the page messenger.aspx where we can check if the ChatSystem is running, if the service is stopped then send some alert and close the messenger, it’s possible?

  •  06-30-2009, 3:13 PM 53656 in reply to 53644

    Re: Close messenger once the ChatSystem has been stopped

    If you stop the ChatSystem, the client side will get server side ajax exception.
     
    We are preparing publish the 5.1 version, which will give the client side correct shutdown error message.
     
    Regards,
    Terry
     
  •  06-30-2009, 6:29 PM 53660 in reply to 53656

    Re: Close messenger once the ChatSystem has been stopped

    Maybe one alternative is using a flag, currently I found one that is used to display the alert when one user try to close the messenger page (messenger.aspx) and check if the messenger is connected:

     

    window.onbeforeunload = function()

                {

                    if (IsConnected())

                    {

                        return "[[UI_AreYouSureQuitMessenger]]";

                    }

                }

     

    I don’t know if exist some other function between all those JavaScript files used for the messenger that can do the trick of catch the status (I already try to use the IsConnected function but not work unless the page make a postback).

     

    Please let me know what you think about this alternative.

    Regards
     
  •  07-01-2009, 4:04 AM 53665 in reply to 53644

    Re: Close messenger once the ChatSystem has been stopped

    If you close the ChatSystem , many code will throws exception while it not available.
     
    So , what do you need exactly ?
     
    Regards,
    Terry
     
  •  07-01-2009, 12:28 PM 53679 in reply to 53665

    Re: Close messenger once the ChatSystem has been stopped

    The problem is when a user sign out of the site (the signout call ChatSystem.Stop()), but the Messenger window remain open, then some errors appears because like you say the ChatSystem has been stopped, the idea is handle all those errors and the options I thought are:

     

    a)      Catch the errors that appear in the messenger and in his place give to the user one custom message and ask him to close the messenger window.

     

    b)      Catch the change in the status of ChatSystem in the messenger page and close the messenger page.

     
    Regards 
View as RSS news feed in XML