admin管理员组文章数量:1422029
I have an existing panel where I set the html manually with a variable like so:
s = '<H1>My Html Page';
s += '[more html]]';
var panel = new Ext.Panel({
id: 'service_Billing',
title: 'Billing',
tbar: [],
html: s
});
How can I specify a path on same server server of a .php file instead of the variable as the source of the html. Something like /path/example/data.php
I have an existing panel where I set the html manually with a variable like so:
s = '<H1>My Html Page';
s += '[more html]]';
var panel = new Ext.Panel({
id: 'service_Billing',
title: 'Billing',
tbar: [],
html: s
});
How can I specify a path on same server server of a .php file instead of the variable as the source of the html. Something like /path/example/data.php
Share Improve this question asked Apr 15, 2010 at 0:02 stormiststormist 5,88912 gold badges51 silver badges66 bronze badges2 Answers
Reset to default 7You're looking for autoLoad
.
var panel = new Ext.Panel({
autoLoad: '/path/example/data.php',
id: 'service_Billing',
title: 'Billing',
tbar: []
});
Use Ext.Ajax to grab the content and update the panel:
var panel = new Ext.Panel(...);
Ext.Ajax.request({
url: '/your/script.php',
success: function(response,opts){
opts.panel.update(response.responseText);
},
panel: panel
});
Or something like that ought to do it.
本文标签: javascriptUsing ExtPanel how do I specify a php page as the html sourceStack Overflow
版权声明:本文标题:javascript - Using Ext.Panel how do I specify a .php page as the html source? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745355021a2654997.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论