Main » 2010 » March » 24 » Javascript Error: Expected identifier, string or number on IE
12:18 PM
Javascript Error: Expected identifier, string or number on IE
Just come up against this bad boy. So thought I’d provide the solution.
So you’re getting the very descriptive Javascript Error: Expected identifier, string or number in IE. What’s worse when you use firefox, which is infinitely better for debugging JavaScript it works just fine. Don’t worry the solutions is quite simple. My error was caused by the code below.
Can you see the problem? Me Neither. It turns out that IE in its infinite wisdom cannot handle empty JavaScript array elements. So in the code where I have put {backgroundColor: "#FDD017”, } (which to be fair was an over sight) makes IE freak out.
So the solution is simple make sure you don’t leave trailing commas. Oh by the way the code creates a dialog if the user click "Go to Data …” it scrolls slowly(using the scroll to plugin for jquery) to the data quality than makes the input fields in my data Quality section flash yellow. Fixed Code below.