The Kat's Work - Blog
Main | Blog | Registration | Login
Friday
2024-04-19
7:48 AM
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: 1082 | 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
Adverts
Search
Calendar
«  March 2010  »
SuMoTuWeThFrSa
 123456
78910111213
14151617181920
21222324252627
28293031
Entries archive
Site friends
  • Create your own site
  • Spree4.com
  • My Blog
  • Statistics

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