| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 846 人关注过本帖
标题:[求助]问一下使用JS开启msn messenger应该如何实现
只看楼主 加入收藏
yqi2
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-4-18
收藏
 问题点数:0 回复次数:0 
[求助]问一下使用JS开启msn messenger应该如何实现
去了一下MSDN有关于使用JS开启msn messenger的代码

<script type="JavaScript">
<!--

var obj;
var winModalWindow;
var AppID = "10331003";
var emailID = "";
//In the code variable declarations above, the AppID variable is assigned the value of the game Hexic (1003) for users//within the US (1033). You should substitute the correct value assigned to your application (by the Support team)//for your desired market.

function TryItNow(AppID)
{
// Test #1: Launch with no email variable value causing the user to have to select another user to interact with.
CheckMessenger();
LaunchApp(AppID, "");
}

function LaunchApp(AppID, emailID)
{
if (obj != null)
{
obj.LaunchApp(AppID, emailID);
}
}
function CheckMessenger()
{
eval ('try {obj = new ActiveXObject("MSNMessenger.P4QuickLaunch"); } catch (e) {obj = null;}');
var strErrorPage = "http://" + [HOSTNAME] + "/Error.aspx"


if ([Browser is not IE])
{
ShowWindow(strErrorPage, 410, 130);
}
else if (obj == null)
{
ShowWindow(strErrorPage, 410, 225);
}

}



function IgnoreEvents(e)
{
return false
}

//Display error message if the MSN Messenger client 6.2 is not installed or the browser is not Internet Explorer
function ShowWindow(strError, width, height)
{
if (window.showModalDialog)
{

window.showModalDialog(strError,null,
"dialogWidth="+width+"px;dialogHeight="+height+"px;help=no;dialogLeft=160")
}
else
{

var ah = screen.availHeight;

var y = (ah - height) / 2;

window.top.captureEvents (Event.CLICK|Event.FOCUS)
window.top.onfocus=HandleFocus
winModalWindow = window.open (strError,"ModalChild",
"dependent=yes,width="+width+",height="+height+",top="+y+",left=160,screenX=160,screenY="+y)
winModalWindow.focus()
}
}


function HandleFocus()
{
if (winModalWindow)
{
if (!winModalWindow.closed)
{
winModalWindow.focus()
}
else
{
window.top.releaseEvents (Event.CLICK|Event.FOCUS)
}
}
return false
}

</script>
其中关键变量就是appid和Bot,其中AppID一直没搞懂是什么,但是直接使用后面的bot变量来记录邮件地址应该也是可以的
但是小弟在测试时候一直出问题,哪位老大帮忙看看问题出在哪儿,可不可以把修改的代码拿上来看看
多谢了
搜索更多相关主题的帖子: messenger msn var AppID 
2007-04-18 08:58
快速回复:[求助]问一下使用JS开启msn messenger应该如何实现
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019273 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved