View Full Version : Include external code

5 Feb 2013, 3:36 AM

at this place i have a beginner question.

I have a script with a treestore at the left side. On itemclick in the center opens a tab

listeners: {
itemclick: function(view, record, item, index, evt, eOpts) {

// get the click tree node's text and ID attribute values.
var nodeText = record.get('text');
var tabId = record.get('id');

// if the ID starts with 'branch', then you clicked on a tree branch, instead of a leaf.
if (tabId.toLowerCase().substr(0, 5) == 'menue') {
// Ext.Msg.alert('Tree Branch Clicked', 'You clicked on tree branch ' + nodeText);

if (tabId == 'tabDatenBe'){........Do something

And now i want to outsource the code after if (tabId ==...
And it should be loaded only when activated

I hope that I could explain my request.

6 Feb 2013, 4:01 PM
This sounds like a bad design. So you want to load a script and then execute something within it? You can load a script via Ext.Loader.loadScript