Warning: Cannot modify header information - headers already sent by (output started at /home/cssquirrel/www.cssquirrel.com/blog/index.php:4) in /home/cssquirrel/www.cssquirrel.com/blog/wp-includes/feed-rss2-comments.php on line 8
Comments on: jQuery, JSON and IE – Getting Incorrect Array Length http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/ opinions and news on web design Mon, 12 Dec 2011 18:22:38 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: Meag http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-31941 Meag Fri, 16 Apr 2010 20:35:08 +0000 http://www.cssquirrel.com/?p=106#comment-31941 Thanks, bud. I could foresee this fix being a big pain in the a$$ - toth for keeping your post up. Thanks, bud. I could foresee this fix being a big pain in the a$$ – toth for keeping your post up.

]]>
By: Kyle Weems http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-23396 Kyle Weems Tue, 05 May 2009 22:12:41 +0000 http://www.cssquirrel.com/?p=106#comment-23396 @Charles - I completely agree that IE's debug information is probably the most useless in the world. It drives me batty. @Charles – I completely agree that IE’s debug information is probably the most useless in the world. It drives me batty.

]]>
By: Charles St-Pierre http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-23392 Charles St-Pierre Tue, 05 May 2009 21:34:06 +0000 http://www.cssquirrel.com/?p=106#comment-23392 [slap my forehead] Of course! Thanks for this article. And no matter if IE is right in doing this way, I'm still mad at it for giving me useless debug informations. "is null or not an object" WTH?!? [slap my forehead] Of course! Thanks for this article.

And no matter if IE is right in doing this way, I’m still mad at it for giving me useless debug informations.

“is null or not an object” WTH?!?

]]>
By: Jerry Carter http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-990 Jerry Carter Mon, 08 Dec 2008 15:45:19 +0000 http://www.cssquirrel.com/?p=106#comment-990 Rock it. That was exactly my issue. thanks!!! Rock it. That was exactly my issue. thanks!!!

]]>
By: Kyle Weems http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-775 Kyle Weems Mon, 10 Nov 2008 17:35:51 +0000 http://www.cssquirrel.com/?p=106#comment-775 @Joe - Well... that's a good point. I'll admit, I'm so accustomed to IE interpreting something the wrong way that I often jump to conclusions and assume a behavioral difference between Internet Explorer and any other browser means that IE is behaving incorrectly. Score a point for IE. And actually, it's probably lazy programming to include that trailing comma, so I can't really call IE to task for being strict about it. @Joe – Well… that’s a good point. I’ll admit, I’m so accustomed to IE interpreting something the wrong way that I often jump to conclusions and assume a behavioral difference between Internet Explorer and any other browser means that IE is behaving incorrectly.

Score a point for IE. And actually, it’s probably lazy programming to include that trailing comma, so I can’t really call IE to task for being strict about it.

]]>
By: Joe http://cssquirrel.com/blog/2008/10/14/jquery-json-and-ie-getting-incorrect-array-length/comment-page-1/#comment-772 Joe Sun, 09 Nov 2008 13:29:17 +0000 http://www.cssquirrel.com/?p=106#comment-772 First, I am by no means a fan of Internet Explorer -- I use Firefox as my browser in linux, and I'm a web developer and all versions of IE to date are the bane of my career. However, this is one of those rare cases where IE is actually interpreting the RFC for JSON (RFC4627) correctly. Granted, the RFC does not explicitly say that the trailing comma "MUST NOT" exist, or "SHOULD NOT" exist, the grammar used to describe the comma-separated lists clearly shows that a value should come after the value-separator: > object = begin-object [ member *( value-separator member ) ] end-object > array = begin-array [ value *( value-separator value ) ] end-array So this is actually Firefox being generous and allowing value-separator to *not* be followed by a value, which is sort of going against the RFC. For a PHP developer, having a trailing comma with no value following it is allowed, and many developers add it by default in order to prevent parse errors that occur when you add a new element to the list and forget the comma. But one must admit it's non-standard and unneeded, so strict interpretation should require that a value follows a value-separator. First, I am by no means a fan of Internet Explorer — I use Firefox as my browser in linux, and I’m a web developer and all versions of IE to date are the bane of my career. However, this is one of those rare cases where IE is actually interpreting the RFC for JSON (RFC4627) correctly. Granted, the RFC does not explicitly say that the trailing comma “MUST NOT” exist, or “SHOULD NOT” exist, the grammar used to describe the comma-separated lists clearly shows that a value should come after the value-separator:

> object = begin-object [ member *( value-separator member ) ] end-object

> array = begin-array [ value *( value-separator value ) ] end-array

So this is actually Firefox being generous and allowing value-separator to *not* be followed by a value, which is sort of going against the RFC. For a PHP developer, having a trailing comma with no value following it is allowed, and many developers add it by default in order to prevent parse errors that occur when you add a new element to the list and forget the comma. But one must admit it’s non-standard and unneeded, so strict interpretation should require that a value follows a value-separator.

]]>