The Kat's Work - Blog
Main | Blog | Registration | Login
11:47 PM
Welcome Guest | RSS
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.

Views: 750 | Added by: The_Kat | Tags: string or number on IE, Expected identifier, Expected identifier string or numbe, Javascript Error | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Login form
«  March 2010  »
Entries archive
Site friends
  • Create your own site
  • My Blog
  • Statistics

    Total online: 1
    Guests: 1
    Users: 0
    Copyright MyCorp © 2019
    Website builderuCoz