Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a CSV File upload on GeoExt Map App. I need to place the upload function within the Ext.Action, so that I can add it to the toolbar of the GeoExt Panel. I am trying to implement this example. Here is my code,

action = new Ext.Action({
        text: "Upload Excel",
        control: new Ext.create('Ext.form.Panel', {
                title: 'Upload a CSV File',
                width: 400,
                bodyPadding: 10,
                frame: true,
                renderTo: Ext.getBody(),
                items: [{
                    xtype: 'filefield',
                    name: 'csv',
                    fieldLabel: 'CSV Upload',
                    labelWidth: 50,
                    msgTarget: 'side',
                    allowBlank: false,
                    buttonText: 'Select CSV File'

                buttons: [{
                    text: 'Upload',
                    handler : function() {
                        var form = this.up('form').getForm();
                                url: '',
                                waitMsg: 'Uploading the CSV File...',
                                success: function(fp, o) {
                                    Ext.Msg.alert('Success', 'Your csv file "' + o.result.file + '" has been uploaded.');
        map: map,
        // button options
        tooltip: "Upload CSV File",
        // check item options
        group: "newTool"
    actions["upCSV"] = action;

Firebug keeps giving me this error,

TypeError: b[d.xtype || e] is not a constructor

Am I declaring the function incorrectly within the Ext.Action?

share|improve this question

JavaScript is such a pain in the ass to debug!

I can't find the problem in your code but here are some points that will help you to find it:

  • Get the non minified version of Ext.

  • Put some "console.log('>> function x start')" , "console.log('<< function x end')" in your code.

  • As a final resource place "debbuger;" at the start.

Since it's a generic ExtJS question, you can also ask it at Stackoverflow.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.