PDA

View Full Version : Unable to use an external js from another js



KarmaKoder
16 Apr 2011, 3:31 PM
In my index.html file I'm including


<script type="text/javascript" src="javascripts/instant.js"></script>

The script is actually included because if I use its functionalities inside the index.html file I can see that it works.

Now, I'm trying to use its functionalities in another file: index.js


ListDemo.detailPanel = new Ext.Panel({
id: 'detailpanel',
tpl: [
'<img class="instant itxtalt nocorner" src="grado.jpg" width="320px">',
],
scroll: 'vertical',
fullscreen: true,
layout: 'fit',
dockedItems: [ListDemo.detailToolbar]
});

The problem is that I should see a frame around the image (as I do see if I place the same code in the index.html file) but I just see the plain image as the class="instant itxtalt nocorner" (defined in the instant.js file) was not considered.

What am I doing wrong?

Thanks for your time guys!