DelphiFAQ Home Search:

Error 'undefined' is null or not an object in Internet Explorer

 

comments43 comments. Current rating: 4 stars (23 votes). Leave comments and/ or rate it.

Question:

I am developing a web application using ExtJS and when I open my URL in Firefox (2), everything looks good and works well. In Internet Explorer (6) I get an error message

Error 'undefined' is null or not an object

Internet Explorer Javascript Error Message



Any ideas?

Answer:

I had the same error once. Look for any array of properties that has a trailing , (comma).
This can happen easily in ExtJS source code where frequently you will have a list of comma separated properties, then you delete the last one of those properties and you forget to remove the trailing comma.

Firefox doesn't complain, but Internet Explorer throws a cryptic error message.

The worst issue is that Internet Explorer gives you a line number and character position that seems worth nothing. It doesn't even tell you, in which source file your bug is.

Do you see the buggy comma in the example below? I marked it red, yet it's still not easy to spot. I guess my source code is messy :-|

  gridFruits = new Ext.grid.EditorGridPanel({
                        store: storeFruits,
                        cm: new Ext.grid.ColumnModel([
                         {header:"Fruit", width: 30, sortable:true, dataIndex:'group',
                                editor:new Ext.form.TextField({allowBlank:false })},

                         {header:"Vitamin", width: 15, sortable:true, dataIndex:'vitamin'},

                         {header:"Profile", width: 15, sortable:true, dataIndex:'profile',
                                renderer: displayProfile},
                        ]),
                        viewConfig: { forceFit: true },
                        sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
                        clicksToEdit:2,
                        height: 444
                    });

Comments:

You are on page 3 of 3, other pages: 1 2 [3]
2015-09-12, 02:13:00
anonymous from India  
    translate = function (styles, href, media) {
        var qs = styles.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),
                ql = qs && qs.length || 0,
                //try to get CSS path
                href = href.substring(0, href.lastIndexOf('/')),
                repUrls = function (css) {
                return css.replace(/(url\()['']?([^\/\)''][^:\)'']+)['']?(\))/g, '$1' + href + '$2$3');
                },
                useMedia = !ql && media,
                //vars used in loop
                i = 0,
                j, fullq, thisq, eachq, eql;

hello sir ,please help me in this .em getting an error in this .
2020-06-27, 20:47:07
Felipe from United Kingdom  
rating
buy generic viagra pills online
2020-07-01, 10:36:28
Vincent from Ukraine  
rating
viagra tablets online
2020-07-05, 00:24:41
Tiffani  
rating
cost of amoxicillin at walmart
2020-07-07, 01:08:46
Courtney  
rating
where to buy generic cialis online forum
2020-07-07, 15:00:49
Randy from Germany  
rating
tylenol 3 online from overseas
2020-07-09, 13:53:49
Glenn from United Kingdom  
rating
alternative medicine for erectile dysfunction
2020-07-09, 18:45:12
Dian from Germany  
rating
tylenol extra strength acetaminophen
2020-07-19, 10:11:23
Norman  
rating
where do you buy hydroxychloroquine
2020-07-20, 10:42:56
Marissa  
rating
viagra street price per pill
2020-07-23, 15:45:44
Elisabeth from Greece  
rating
hydroxychloroquine online prescription
2020-07-26, 17:35:59
Teri  
rating
acetaminophen 500 mg gelcaps
2020-07-30, 08:00:54
Amanda  
rating
prednisone 10 milligram
You are on page 3 of 3, other pages: 1 2 [3]

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: