Make sure that the end of your json(coming from your php script) doesn't have a carriage return on it, or that any of the items do not have line feeds/carriage returns on them.
Main Topics
Browse All TopicsHi,
I am using ajax and json and all works o.k. in firefox but throws an error in IE, can anyone see where I am going wrong?
The error is " Expected '}'" on the data=eval line below.
Below is a basic example of the data I am trying to eval..
Been tearing my hair out trying to get it working.
thanks,
Ewan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
After I cleared the cache in IE it worked but only for 1 object.. if I add a "," after each object if works in firefox for 1 or more objects but in IE for 1 or more it errors with "Expected Identifier,string or number" when I try to eval it.
Amit_q, I alerted the responsetext and it matched in IE and firefox.
Morcalavin, I am not inserting any <br> but when I alert it or look using firebug it does appear as below...
{"vehicles":{ 24:{"id": "24",
"f1": "vauxhall"
},25:{"id": "25",
"f1": ""
},}}
Thanks for your help,
Ewan
Business Accounts
Answer for Membership
by: amit_gPosted on 2009-09-25 at 09:12:25ID: 25424423
Works fine in both FF and IE8. Must be a difference between what IE8 sees. Can you confirm that the this.responseText is same in both FF and IE8? Alert it to see.
Select allOpen in new window