PDA

View Full Version : How to enable script execution in a ContentPanel pointing to an url?



baxter
20 Apr 2007, 2:26 AM
hi,
In the center layoutRegion of my BorderLayout, I need to call for an external url pointing to an html page wich contains javascript.
My purpose is to make possible this javascript code execution.

In order to do this, I have done the following :



layout = new Ext.BorderLayout(document.body, {
...
center: {
titlebar: true,
autoScroll:true,
}
...
});
layout.beginUpdate();
...
var CenterPanel = Ext.DomHelper.append(document.body, {tag:'div ', cls:'CenterPanel'}, true);
layout.add('center', new Ext.ContentPanel(CenterPanel,
{ autoScroll:true,
fitContainer:true,
fitToFrame:true
}));
CenterPanel.getUpdateManager().update({url:'myPage.html',script:true});
...
layout.endUpdate();

But, javascript embedded with my url (html page) does'nt work!

When I changed the config option "script" value to FALSE, it doesn't work, too!!

Thank u for help.

KimH
20 Apr 2007, 3:20 AM
Try scripts : true.

baxter
20 Apr 2007, 4:02 AM
thanx, it's ok!!

RobbyRacoon
23 Apr 2007, 2:09 AM
I have tried that, and it doesn't work for me. Any other hints?

Okay, further testing shows that using scripts: true allows all of the inline script to work (or maybe it would anyway?), but all script embedded within a < script > tag is completely stripped out.

KimH
23 Apr 2007, 2:14 AM
What is your code like? Please post... otherwise I can't help you.