2
我正在使用以下代码在sencha触摸标签面板中插入iframe。我正在Iframe中加载已认证的页面。此页面包含用户名和密码字段。页面登录成功,但我想从iframe回复到Sencha应用程序的登录状态的响应。Sencha Touch 2.3.1 Iframe
Ext.application({
launch: function()
{
Ext.define('I', {
extend: 'Ext.Component',
xtype: 'iframecmp',
config: {
url : null
},
initialize: function() {
console.log("Main");
var me = this;
me.callParent();
me.iframe = this.element.createChild({
tag: 'iframe',
src: this.getUrl(),
style: 'width: 500px; height: 500px; align:middle;'
});
me.relayEvents(me.iframe, '*');
}
});
Ext.create("Ext.tab.Panel", {
extend: "I",
tabBarPosition: 'bottom',
fullscreen: true,
items: [
{
title: 'Sencha',
id: "main-frame",
name: "main-frame",
iconCls: 'action',
xtype: 'iframecmp',
url: 'http://testcop.bridgealliance.com/TSM_dev_Insphere',
style: 'width: 500px; height: 500px; left: 100px;',
scroll: 'vertical'
},
{
title: 'Sencha',
id: "main-frame2",
name: "main-frame2",
iconCls: 'action',
xtype: 'container',
html: '<iframe src="http://localhost/phpinfo.php"></iframe>',
style: 'width: 50%; height: 50%; left: 10%; top: 10%;'
}
]
});
}
}); // application()