1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Dade is on a distinguished road

      0  

    Default Unanswered: Object doesn't support this property or method ERROR on IE 7

    Unanswered: Object doesn't support this property or method ERROR on IE 7


    Hello, I`m trying to make a form for upload a file to my servlet. I wrote my code and it works fine in FF, but it doesn't display in IE, it returns an "Object doesn't support this property or method" error.

    I supposse it must be something relative a coma or something like that, but I can´t see it.

    Here is my code.
    Thx in advance and sorry for my english.


    Code:
     var uploadFile={
                    xtype : 'fieldset',
                    title : 'Buscar',
                    autoHeight : true,
                    items : [{
                               xtype : 'fileuploadfield',
                               width:400,
                               // emptyText : 'Selecciona un fichero',
                                fieldLabel : 'Archivo',
                                id : 'file-path',
                                buttonCfg : {
                                text :  'Examinar'
                                }
                            }],
                    buttons : [{
                                text : 'Subir archivo',
                                cls: 'sendButton',
                                width: 125,
                                handler : function() {
                                    Path = fp.form.findField('file-path').getValue();
                                    var box = Ext.MessageBox.wait('uploading file ','please_wait');
    
                                    if (fp.getForm().isValid()) {
                                        Ext.Ajax.request({
                                            url : 'lanzamientoFicheros',
                                            headers: {'Content-Type':'multipart/form-data; boundary='+boundary},
                                           
                                           // isUpload: true,
                                            method : 'POST',
                                            waitMsg : 'Uploading your file...',
                                            success : function(response) {
                                                box.hide();
                                                Ext.Msg.alert("Success","Upload Successfull!");
    
                                            },
                                            failure : function() {
                                                box.hide();
                                                Ext.Msg.alert("Failure","Upload Failed!");
                                            }
                                        });
                                    }
                                }
    
                            }]
    
    
            };
            var fp = new Ext.FormPanel({
                        autoHeight : true,
                    items : [
                                   uploadFile
                                ]        
                    });

  2. #2
    Sencha - Services Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,369
    Answers
    61
    Vote Rating
    35
    arthurakay is a jewel in the rough arthurakay is a jewel in the rough arthurakay is a jewel in the rough

      0  

    Default


    Does the error message give you any other information? Namely, a filename or line number where the error occurs?
    Arthur Kay
    Developer Relations Manager, Sencha Inc.

    Twitter | Sencha Chicago User Group

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Dade is on a distinguished road

      0  

    Default


    Yes.

    "Unknown runtime error" ===> ext-all-debug.js, line 553 character 13

  4. #4
    Sencha - Services Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,369
    Answers
    61
    Vote Rating
    35
    arthurakay is a jewel in the rough arthurakay is a jewel in the rough arthurakay is a jewel in the rough

      0  

    Default


    (BTW, moving this thread out of Ext:Open Discussion)

    Hm, okay we need to do a bit more debugging. When does the error occur? (On page load? When you submit the form?)

    The error from IE is very generic and could be any number of things.

    Are you using native IE7? If you can use IE8/9 and open the debugging tools, you could put a break point in the code and look to see where the stack trace takes us.

    Despite the fact the error pops up in ext-all-debug.js, the problem is caused somewhere else.
    Arthur Kay
    Developer Relations Manager, Sencha Inc.

    Twitter | Sencha Chicago User Group

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Dade is on a distinguished road

      0  

    Default


    In first place I must say I was mistaken, is not IE7, it is IE8. The error ocurs on the load of the page.

    This is what I see on FF


    And this on IE8



    I Have already debbuged ir, but can´t find the reason. It throws 2 major errors:

    ObjectExpected ---> ext-all-debug.js line 10462 character 13

    Code:
     create : function(config, defaultType){
                return config.render ? config : new types[config.xtype || defaultType](config);
            },
    Unknown runtime error ---> ext-all-debug.js line 553 character 13

    Code:
    overwrite : function(el, o, returnElement){ el = Ext.getDom(el); el.innerHTML = createHtml(o); return returnElement ? Ext.get(el.firstChild) : el.firstChild; },


    Thanks in advance!

  6. #6
    Sencha - Services Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,369
    Answers
    61
    Vote Rating
    35
    arthurakay is a jewel in the rough arthurakay is a jewel in the rough arthurakay is a jewel in the rough

      0  

    Default


    For whatever reason, I can't see the images you provided.

    I Have already debbuged ir, but can´t find the reason. It throws 2 major errors:
    Here's the thing... when I said "Despite the fact the error pops up in ext-all-debug.js, the problem is caused somewhere else", I meant that something in one of your classes is causing the errors in the ExtJS framework. It could be a trailing comma, or a bad reference to some element/component. Honestly, it could be anything.

    In many cases, telling me what lines ext-all-debug.js fails does no good for exactly that reason - the problem could be anything, but we know for certain that your code causes the problem.

    What we need to do is to set a break point using our debugger (which you can do in the IE Developer Tools). Then, once we hit the break point (but before the error is thrown) we have to look at the stack trace to see which of your files execute code PRIOR to our break point. Doing that will help us narrow down the file causing the issue, as well as the potential problem code.

    I wish I could be more specific - the key lies in the stack trace.

    If you can't figure that out, then comment-out sections of your application to see if you can narrow-down the location of the problem code.
    Arthur Kay
    Developer Relations Manager, Sencha Inc.

    Twitter | Sencha Chicago User Group

Thread Participants: 1

Tags for this Thread