Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Chat and Cute Web Messeng...
»
Re: Chat_OpenContact('<username>') with Oldmessenger (possible?)
Re: Chat_OpenContact('<username>') with Oldmessenger (possible?)
02-26-2009, 1:36 AM
cutechat
Joined on 07-22-2004
Posts 2,332
Re: Chat_OpenContact('<username>') with Oldmessenger (possible?)
Reply
Quote
Please check this way:
function
Chat_OpenContact(targetuserloginname)
{
var
winshown=
false
;
function
SendOpenContactCommand()
{
var
xmlhttp=Chat_CreateXmlHttp();
xmlhttp.open(
"POST"
,chatservice_url,
true
);
xmlhttp.setRequestHeader(
"Content-Type"
,
"application/x-www-form-urlencoded; charset=utf-8"
);
var
arr=[];
arr[arr.length]=
"METHOD=OPENCONTACT"
;
arr[arr.length]=
"CONTACT="
+encodeURIComponent(targetuserloginname);
var
data=arr.join(
"&"
)
xmlhttp.send(data);
}
function
CheckMessenger()
{
if
(GetCookie(
"CuteChatIMMainForm"
))
{
SendOpenContactCommand()
}
else
{
setTimeout(CheckMessenger,100);
if
(winshown)
return
;
winshown=
true
;
window.open(
"CuteSoft_Client/CuteChat/Messenger.aspx"
,
"Messenger"
,
'status=1,width=300,height=500,resizable=1'
);
}
}
CheckMessenger()
}
Regards,
Terry
View Complete Thread