0

我有一个显示 Flash 内容的追随者。问题是我可以在我的 Chrome 和 Mozilla 上查看它,但我无法在 IE 中查看它(在 IE 8,9 中尝试过)。我得到的只是一个白屏,当我右键单击它时显示“电影未加载”。我已经清除了缓存,重置了 IE,再次安装了 flash……什么都做了……但它似乎不起作用。是 IE 无法理解的部分代码吗?

我也可以在 IE 中看到 youtube 视频。我猜这个代码有问题

embedAccountTree() 在代码的最后一部分是我猜一些问题的地方

<div id="flextree" style="height:300px"></div>
<script>

if (typeof XMLHttpRequest == "undefined") {
  XMLHttpRequest = function() {
    try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
      catch(e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
      catch(e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP"); }
      catch(e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(e) {}
    throw new Error("This browser does not support XMLHttpRequest.");
  };
}

function getRowId(eventObj) {
return('%%%Row_Id%%%');
}

function Login(eventObj) {
    var logincc = sso_login('%%%SSO Token%%%');
    return( logincc );  
}

function Logout(eventObj) {
    var logoutcc = sso_logout();
    return( logoutcc );
}

function sso_login(sso_token)  {
    ssotoken = encodeURIComponent(sso_token);
    var pageroot = document.location;
    pageroot = pageroot.toString();
    pageroot = pageroot.substr(0, pageroot.indexOf('/', 10));
    try {
        var commandStr = '?command=ssologin&odSsoToken=' + ssotoken;
        var oXMLHttpRequest = new XMLHttpRequest;
        var wurl = pageroot + '/Services/Integration' + commandStr;
        oXMLHttpRequest.open('GET', wurl, false);
        oXMLHttpRequest.send(null);
        return( oXMLHttpRequest.status );
    } catch (e) { alert('Login Error: ' + e.message); return("FAIL"); }
}


function sso_logout() {
    var pageroot = document.location;
    pageroot = pageroot.toString();
    pageroot = pageroot.substr(0, pageroot.indexOf('/', 10));
    try {
        var commandStr = '?command=logoff';
        var oXMLHttpRequest = new XMLHttpRequest;
        oXMLHttpRequest.open('GET', pageroot + '/Services/Integration' + commandStr, false);
        oXMLHttpRequest.send(null);
        return ( XMLHttpRequest.status );
    } catch (e) { alert('Logout Error: ' + e.message); return("FAIL");  }
}

function invokeAjax( eventObj ) {
    var soapAction = eventObj.soapAction;   
    var pageroot = document.location;

    inSoap = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">';   
    inSoap += '<soapenv:Header/>';  
    inSoap += '<soapenv:Body>';
    inSoap += eventObj.inSoap; 
    inSoap += '</soapenv:Body>'; 
    inSoap += '</soapenv:Envelope>';

    pageroot = pageroot.toString();
    pageroot = pageroot.substr(0, pageroot.indexOf('/', 10));
    try {
        var oXMLHttpRequest = new XMLHttpRequest;
        oXMLHttpRequest.open('POST', pageroot + '/Services/Integration', false);

            oXMLHttpRequest.setRequestHeader('SOAPAction', '"'+soapAction+'"');
            oXMLHttpRequest.setRequestHeader('Content-Type', 'text/xml');
            oXMLHttpRequest.send(inSoap);
        return oXMLHttpRequest.responseText;    
    }
    catch (e) {
        alert('Error: ' + e.message);
        return( '' );
    }
}
**function embedAccountTree(rowid,lang)
{
    var embed = "";
    embed = embed + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="accountTree1" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">';
    embed = embed + '<param name="movie" value="%%%PATH_CSE%%%"/>';
    embed = embed + '<param name="quality" value="high" />';
    embed = embed + '<param name="bgcolor" value="#FFFFFF" />';
    embed = embed + '<param name="allowScriptAccess" value="always" />';
    embed = embed + '<param name="FlashVars" value="lang=' + lang +'&rowid=' + rowid + '"/>';
    embed = embed + '<embed src="../user/content/accountTreeSample" quality="high" bgcolor="#FFFFFF"';
    embed = embed + ' width="100%" height="100%" name="accountTree1" align="middle"';
    embed = embed + ' play="true"';
    embed = embed + ' loop="false"';
    embed = embed + ' quality="high"';
    embed = embed + ' allowScriptAccess="always"';
    embed = embed + ' type="application/x-shockwave-flash"';
    embed = embed + ' pluginspage="http://www.adobe.com/go/getflashplayer" ' ;
    embed = embed + ' FlashVars="lang=' + lang +'&rowid=' + rowid + '" >';
    embed = embed + '</embed>';
    embed = embed + '</object>';

    var x=document.getElementById("flextree");
    x.innerHTML = embed;
}**
embedAccountTree("%%%Row_Id%%%","ENG");
</script>
4

1 回答 1

0

将IE的Adob​​e Flash插件更新到最新版本并尝试...

于 2014-01-14T12:53:21.203 回答