开发者

Firefox: Communicator presence issue

We are using NameCtrl in our ap开发者_JAVA技巧plication and works fine in IE. But the same is not working in Firefox. The firefox website says that they doesnt support ActiveX controls. http://support.mozilla.com/en-US/kb/ActiveX

Is there a way to show communicator presence in Firefox too?


A little late, but this IS possible using browsers other than IE.

if(window.ActiveXObject) {
    nameCtrl = new ActiveXObject("Name.NameCtrl");
} else {
    try {
        nameCtrl = new ActiveXObject("Name.NameCtrl");
    } catch (e){
        nameCtrl = (function(b){
            var c = null;
            try {
                c = document.getElementById(b);
                if (!Boolean(c) && (Boolean(navigator.mimeTypes) && navigator.mimeTypes[b] && navigator.mimeTypes[b].enabledPlugin)) {
                    var a = document.createElement("object");
                    a.id = b;
                    a.type = b;
                    a.width = "0";
                    a.height = "0";
                    a.style.setProperty("visibility", "hidden", "");
                    document.body.appendChild(a);
                    c = document.getElementById(b)
                }
            } catch (d) {
                c = null
            }
            return c
        })("application/x-sharepoint-uc");
    }
}

if(nameCtrl && nameCtrl.PresenceEnabled){
// code here
}


The NameCrl is an ActiveX component so it will only work in Internet Explorer.

There is no way to do this without custom development. I would suggest using the UCMA APis, building a service that queries presence, and building a JavaScript API to call this service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜