On Jun 10, 7:09 am, david <[email protected]> wrote:
> Hi Alex,
>
> If the code WAS working, the error could be on the received JSON ?
> One though, IE don't like misplaced comma on JSON. For exemple, last
> element of an array that is followed by a comma don't work on IE.
What do "don't like" and "don't work" mean? IE mishandles elisions in
arrays, e.g.:
alert( [,,].length );
should show 2, but IE shows 3. But that just creates an extra empty
member of the array and doesn't not cause a runtime error.
IE will error if an extra comma is included in an object literal, e.g.
var obj = {name:'fred',};
will be fine in Firefox (and others) but error in IE (per the
ECMAScript (ES) spec). As far as I know, ES 5 will allow trailing
commas in object literals, so in perhaps 10 years time they can be
used with reasonable safety. In the meantime, write for ES 3.
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---