IE8 -if JSONP array has no last element after a comma ..get error

Soydaycruro

New Member
My X-site scripting using JSONP encounters error on IE8 but works fine on both firefox and crome...here the returned JSON object passes an array with a comma at the end and no last element ...i.e something like {a,b,c, } ..as you can see the last element is succeeded by a comma and that is what is causing problem on IE.the actual JSONP response is :gotMsg({"msg":[{"lastMsgId":"69","user":"diptanu","textVal":"Sup","time":"2010-09-04 06:20:15",} ...as you can see the last comma is what it says is causing problem...the error is Expected identifier, string or number chat.php?callback=gotMsg&user=&lastMsgId=-1&ref=1&userId=-1&loc=http%3A%2F%2Faagmgyd6.yahoo.joyent.us%2Fchat%2Findex.html, line 1 character 96....Please helpthanksMohan Gupta
 
Back
Top