1
votes

I am testing this javascript in google Chrome browser and it gives me an error: Uncaught SyntaxError: Unexpected Identifier.

    Ext.application({
    name: 'Sencha',
    launch: function() {
        Ext.create("Ext.tab.Panel",{
        fullscreen: true,
         tabBarPosition: 'bottom',

        var image = Ext.widget('image',{
            xtype: "image",
            src: "images.jpg",
            scope: this
        });
    this.add([image]);
        });
    }
});
2

2 Answers

0
votes

Run your code through JSLint. You have syntax errors!

0
votes

You have syntax error. Try this :

Ext.application({
    name: 'Sencha',
    launch: function() {
        Ext.create("Ext.tab.Panel",{
            fullscreen: true,
            tabBarPosition: 'bottom'
        });

        var image = Ext.widget('image',{
            xtype: "image",
            src: "images.jpg",
            scope: this
        });

        Ext.Viewport.add([image]);
    }
});