PDA

View Full Version : TabPanel and JavaScript



ijb
12 Mar 2008, 10:25 PM
I noticed that TabPanels don't parse javascript includes. Embedded javascript is fine though. Is there a workaround for this?

For instance I load external html page which has <script type="text/javascript"><some javascript></script> like this:


tabPanel.add({
title: tabTitle,
iconCls: 'tabs',
autoLoad: {url: targetUrl, callback: this.initSearch, scope: this, scripts: true},
closable:true
}).show();

And it work fine, but if I use this <script type="text/javascript" src="javascript/ext-all-debug.js"></script> in my html page, then it does not.

What gives?

evant
12 Mar 2008, 10:43 PM
Unfortunately script includes don't get parsed, only inline scripts. I'm pretty sure it has something to do with not being able to embed a script from a src tag.

ijb
13 Mar 2008, 2:47 PM
I am not sure why, if add method can parse .html, why it could not parse .js within that .html file (and especially because it can already parse it within the file). Do you care to elaborate just for geekness factor? ~o)