You need to sign in to do that
Don't have an account?
Uncaught SyntaxError: Unexpected token <
Hi,
This is my first post in the discussion boards and newbie to salesforce :)
I have an apex page which includes several Ext JS files from my static resource like the following:
<!-- Ext JS includes-->
<apex:stylesheet value="http://extjs.cachefly.net/ext-4.0.2a/resources/css/ext-all.css"/>
<apex:includeScript value="http://extjs.cachefly.net/ext-4.0.2a/ext-all.js"/>
<apex:includeScript value="{!URLFOR($Resource.web, 'web/designer.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.web, 'web/app/view/ui/RuleManagerViewport.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.web, 'web/app/view/RuleManagerViewport.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.web, 'web/app/view/ui/BusinessRulesSummary.js')}"/>
...
etc
The page loads fine and all my Ext JS components work as expected without any issues. The only thing is, i see the following errors in my console for each JS file I included:
RuleCondition.js:2Uncaught SyntaxError: Unexpected token <
RuleManagerViewport.js:2Uncaught SyntaxError: Unexpected token <
...
etc
I checked and each of these files do not have any < characters in them. They are just javascript.
I see these JS errors in Chrome and in Firefox. It is not affecting the behavior of the page, but I would like to fix these errors. Any ideas what is causing it?
Thanks.
More information, my designer.js looks something like this:
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
name: 'MyApp',
stores: [
'RulesStore',
'ContactsStore',
'FieldStore',
'OperatorStore',
'LogicStore'
],
launch: function() {
Ext.QuickTips.init();
var cmp1 = Ext.create('MyApp.view.RuleManagerViewport', {
renderTo: Ext.getBody()
});
cmp1.show();
}
});