Ext2.2 iframe的刷新問題

在 EXT2.0運行正常的程序,調換 EXT2.2 的腳本之後使用 <iframe> 時,窗口出現 '無法打開 Internet 站點' 的錯誤.

解決辦法是:

找到ext-all.js文件,刪除代碼:Q=setInterval(function(){try{Ext.isReady||document.documentElement.doScroll("left"))}catch(D){return }C()},5);

未壓縮的是docReadyProcId=setInterval(function(){try{Ext.isReady||(document.documentElement.doScroll('left'));}catch(e){return;}
fireDocReady();},5);

 

 

 

釋放ifarme佔用的內存

while(tabs.getComponent(0)!=null){
     // 在移除tabpanel前,釋放內嵌iframe佔用的內存
     tabs.getComponent(0).on("beforeremove", this.fixIFrame, this);
        fixIFrame: function(lr, cp, e) {
         var iFrame = cp.getEl().dom;
         if(iFrame.src) {
           iFrame.src = "javascript:false";
         }
     };
     // 移除tab並釋放內存
     tabs.remove(tabs.getComponent(0),true);
}

上面是項目中的代碼,在應用的時候可以根據需要稍做修改。 參考http://extjs.com/forum/showthread.php?t=11406

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章