#10181 closed bug (invalid)
'name' is null or not an object
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | deferred | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The attached example works perfectly fine in Opera, Firefox, Chrome, IE9.
But in IE7 and IE8 it pops up a javascript error "'name' is null or not an object" somewhere in the jquery code. Tested with both 1.5.2 and 1.6.2 (and 'edge')
The example is supposed to populate two dropdown boxes using a (two-layer deep) associative array: the top layer is used to fill the first dropdown box, and when the user selects an item the second layer is used to fill the second dropdown box.
Change History (11)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | unfiled → deferred |
---|---|
Priority: | undecided → low |
Resolution: | → duplicate |
Status: | new → closed |
This actually traces back to the try/finally
in resolveWith
comment:4 Changed 11 years ago by
Note that when I insert a 'catch(pseudoError)' as mentioned in #9033, the "'name' is null or not an object" exception is indeed caught at that location, and IE8 does no longer show an error on page load.
But... the dropdowns are not populated, so it does not solve my issue :(
comment:5 Changed 11 years ago by
... which makes me think this is unrelated to #9033, since this is an actual (uncaught) exception, and not IE complaining about an invalid try/finally structure.
The main question is what exactly is causing the "'name' is null or not an object" error.
comment:6 Changed 11 years ago by
If you bothered using code quality tools, you'd find that your data object is loaded with trailing commas, which will break in IE.
{ id: '8', name: 'Other' },
{ id: '9', name: 'Tackle Boxes' },
{ id: '20', name: 'Fishing Poles' },
comment:7 Changed 11 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:8 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
comment:9 Changed 11 years ago by
I already ruled that out, as posted above: http://jsfiddle.net/da3nM/20/
JSLint says: "Your JS code is valid." JSHint.org says: "The code check passed"
comment:10 Changed 11 years ago by
Cool, now that there are no errors, it works marvelously. You're welcome.
IE7 http://gyazo.com/dc5024ce7dc105857d32f11fef3a1588.png
comment:11 Changed 11 years ago by
Wow I don't understand how I could have missed that.
My apologies for the false report, and thanks for your patience.
I forgot to mention that the error is triggered by a call at line 74:
I cleaned up the javascript to make jsLint happy: http://jsfiddle.net/da3nM/20/