2

我正在使用 extjs 库。我有一个空白面板,我想用 iframe 将我的另一个 ext 项目加载到其中。这是我的功能(从按钮调用),“面板”是我的空白面板。

function(button){
    var div = document.getElementById('thepanel');
    div.innerHTML = "<iframe src=\"../../../project2/?&type=grades&gradeitem1=40691&\"></iframe>";
}

当我运行该函数时,我可以在 firebug 的控制台中看到 GET 请求,当我在 firebug 中查看 HTML 但浏览器中没有显示任何新内容时,我的所有第二个项目代码/数据都显示在 iframe 中。任何可能阻止我的 iframe 内容显示的想法

我正在使用 MVC 架构,这是声明我的面板的代码:

items:[{
        xtype:'panel',
        itemId:'two',
        id:'thepanel',
        region:'center',
}]

更新:我尝试将 iframe 移动到面板的 html 配置选项,而不是通过单击按钮通过 jquery 添加它。同样,我可以看到 iframe 中 url 的代码显示在 firebug 中,但我的应用程序中没有显示任何内容。这是声明我的面板的代码:

xtype:'panel',
itemId:'two',
id:'thepanel',
region:'center',
html:'<iframe src=\"../../../extjproh2/?&type=grades&gradeitem1=40691\"></iframe>',
height:400,
width:400,
4

1 回答 1

0

最终使用了 sencha 论坛中的这个插件: http ://www.sencha.com/forum/showthread.php?110311-iframePanel&p=943573#post943573

于 2013-03-01T20:12:00.647 回答