Chat_OpenContact('<username>') with Oldmessenger (possible?)

Last post 02-26-2009, 3:34 AM by guillermobt. 2 replies.
Sort Posts: Previous Next
  •  02-25-2009, 6:18 AM 49222

    Chat_OpenContact('<username>') with Oldmessenger (possible?)

    Is there a way to make Chat_OpenContact('IE')" function work with the old messenger (not the embeded newmessenger one)?


    Regards
  •  02-26-2009, 1:36 AM 49251 in reply to 49222

    Re: Chat_OpenContact('<username>') with Oldmessenger (possible?)

    Please check this way:
    1. function Chat_OpenContact(targetuserloginname)   
    2. {   
    3.     var winshown=false;   
    4.     function SendOpenContactCommand()   
    5.     {          
    6.         var xmlhttp=Chat_CreateXmlHttp();   
    7.         xmlhttp.open("POST",chatservice_url,true);   
    8.         xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");   
    9.         var arr=[];   
    10.         arr[arr.length]="METHOD=OPENCONTACT";   
    11.         arr[arr.length]="CONTACT="+encodeURIComponent(targetuserloginname);   
    12.         var data=arr.join("&")   
    13.         xmlhttp.send(data);   
    14.     }   
    15.     function CheckMessenger()   
    16.     {   
    17.         if(GetCookie("CuteChatIMMainForm"))   
    18.         {   
    19.             SendOpenContactCommand()   
    20.         }   
    21.         else  
    22.         {   
    23.             setTimeout(CheckMessenger,100);   
    24.             if(winshown)return;   
    25.             winshown=true;   
    26.             window.open("CuteSoft_Client/CuteChat/Messenger.aspx","Messenger",'status=1,width=300,height=500,resizable=1');   
    27.         }   
    28.     }   
    29.     CheckMessenger()   
    30. }  
     
    Regards,
    Terry
  •  02-26-2009, 3:34 AM 49269 in reply to 49251

    Re: Chat_OpenContact('<username>') with Oldmessenger (possible?)

    Thankyou again Terry.
    It works fine!
     
      Regards
View as RSS news feed in XML