Tuesday, August 4, 2009

Expected identifier, string or number

In another case of "It works in FireFox" this crazy IE error has caused me nothing but problems.

Using Prototype and developing an Ajax application, kept running into this error while testing in IE. Winds up I am not the only one but it's still somewhat elusive.



new Ajax.Updater('term_item', 'index.pl', {
method: 'get',
parameters: {
command: 'item/view',
termlist: 'testlist',
termstatus: '0',
},
evalScripts: true
});


Everything looks fine, and works fine in Firefox, but load this up in Internat Explorer and it immediately error.

The cause, the extra comma after termstats: '0', in the parameters.

Just remove the extra comma and everything works fine.

Go figure.

No comments:

Post a Comment