1

html/dojo ポップアップ内にフレックス SWF を動的に埋め込んでいます。FF と Chrome では正常に動作しますが、IE8/IE9 では「TypeError: オブジェクトはこのプロパティまたはメソッドをサポートしていません」というメッセージが表示されます。IE では、swf を含むポップアップが初めて作成されたときに、すべて正常に動作します。ただし、ポップアップを非表示にして再度開くと、flex 内で actionscript 関数を呼び出そうとすると、エラーがスローされます。どんな助けでも大歓迎です。以下はコード スニペットです。

var srchSuggestDlg;
var srchDlg;
var isSuggSwfInit = false;

/* Called on key up for the search box widget or when search arrow button is clicked
* Displays search suggestions inside popover below the search widget 
*/

cpm.home.index.searchKeyUp = function(evt) {

var srchInput = dojo.byId('xwt_widget_uishell_Header17_0_search_searchTextAP');

if(srchInput.value.length<3)
    return;

if(srchSuggestDlg && srchSuggestDlg.isShowingNow)
{
    try
    {
        swfobject.getObjectById("srchSuggSwf").updateSearchInFlex(srchInput.value);
    }
    catch(e){
        console.error("swf may not be ready 1",e);
    }
    return;
}

if(srchSuggestDlg == null)
{
    srchSuggestDlg = new xwt.widget.layout.Popover({pinnable: false, title: "Suggestions", sideAlign: false, autofocus: false, showHelp: false});
    var divx=dojo.create("div");
    divx.innerHTML="<div id='srchSuggDiv'></p></div>";
    srchSuggestDlg.containerNode.appendChild(divx);

    srchSuggestDlg.openAroundNode(srchInput);

    var flashvars = {swfId:"srchSuggSwf", searchString:srchInput.value};
    var params = {};
    params.quality = "high";
    params.bgcolor = "#ffffff";
    params.allowscriptaccess = "sameDomain";
    params.allowfullscreen = "true";
    var attributes = {};
    attributes.id = "srchSuggSwf";
    attributes.name = "srchSuggSwf";
    attributes.align = "middle";
    params.wmode="window";

    var cachecontrol = Math.floor(Math.random()*99999);

    swfobject.embedSWF("pages/modules/monitor/flex/SearchSuggestion.swf?"+cachecontrol,"srchSuggDiv","200","140","9.0.0","playerProductInstall.swf",flashvars, params, attributes);
    swfobject.createCSS("#srchSuggDiv", "display:block;text-align:left;");

}
else
{
    srchSuggestDlg.openAroundNode(srchInput);
    try
    {
        var srchInput1 = dojo.byId('xwt_widget_uishell_Header17_0_search_searchTextAP');
        //dojo.byId("srchSuggSwf").updateSearchInFlex(srchInput1.value);
        swfobject.getObjectById("srchSuggSwf").updateSearchInFlex(srchInput1.value);
    }
    catch(e) {
        console.error("swf may not be ready 2",e);
    }
}
};


/* Called from flex once flex swf is initialized 
*/

cpm.home.index.suggSwfInit = function(value){
var srchInput = dojo.byId('xwt_widget_uishell_Header17_0_search_searchTextAP');
try
{
    dojo.byId("srchSuggSwf").updateSearchInFlex(srchInput.value);
}
catch(e){
    console.error("swf may not be ready in 3",e);
}
};
4

1 に答える 1

-1

一般的な問題、Node.js のダウンロードとインストール = https://nodejs.org/en/download/

于 2016-09-29T11:29:48.620 に答える