Revision: 43810
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 31, 2011 07:42 by LeeProbert
Initial Code
whereMainPanel = new Ext.Panel({
layout:{align:'stretch'},
cls:'whereMainPanel'
});
whereMainPanel.on('afterrender',function()
{
Ext.Ajax.request({
url: 'assets/animation/WhereAnimProj/WhereAnimProj_export/index.html',
success: function(response, opts) {
whereMainPanel.update(response.responseText);
}
})
this.body.on('click',function(){ menuPanel.setActiveItem(1); backBtn.setVisible(true); })
})
Initial URL
Initial Description
Sometimes you have a load of HTML that is difficult to write up as a String from within a javascript function so this is an example of a simple Panel with an event for after rendering that injects it with content from a file.
Initial Title
Injecting HTML from a file into an Ext.Panel
Initial Tags
ajax, javascript
Initial Language
JavaScript