Monday, May 21, 2007

Avoid extra commas (,) or IE will drive you crazy

Like the title says. While it's perfectly alright to have extra commas (,) in a list of objects in Firefox, IE will throw you cryptic messages like "undefined" or something about a "unique identifier".

The code below will throw the mysterious error messages. See the extra comma at the end of the list of objects.


var myobjlist = [
{name:'status_id', type: 'int'},
{name:'bay_id', type: 'int'},
{name:'project_id', type: 'int'},
];

1 comment:

  1. Thanks a lot! Very usefull tip. I just spent, totally clueless, a few hours debugging an extjs script. Yuo are the day saver!

    ReplyDelete