You can use the update() method of the panel's body (which is an Ext.Element) to load HTML dynamically and run scripts that are found in the HTML blob. You also should consider setting the preventBodyReset config option of the panel to true to prevent Ext's CSS to mess up your display.
E.g.
Code:
Ext.onReady(function() {
var htmlBlob = "<p id='text-ct'></p><script>Ext.get('text-ct').update('Loaded from dynamically loaded script');<\/script>";
var panel = new Ext.Panel({
title: 'Loading HTML dynamically into a panel\'s body',
renderTo: document.body,
width: 500,
height: 100,
buttons: [
{
text: 'Load HTML and scripts',
handler: function() {
//Update panel body (which is an Ext.Element) using the update() method.
//The second argument specify to parse html blob and run code in script tags.
panel.body.update(htmlBlob, true);
}
}
]
});
});