There's a common error that happens quite a lot on IE only and never on Firefox. You search it, you check all your variables, you comment your code to the bare minimum but you can never find it.

Stop looking! Here's the answer.

You probably just forgot a comma (,) at the end of a hash. Here's an example :

var val = {
    cat:"Mistigri",
    dog:"Rex",
    butler:"Jeeves", // There's an extra comma
  }

You see the extra comma at the string “Jeeves”? This what causes the problem. Firefox handles an extra comma nicely but Internet explorer doesn't. To correct the error, just write :

var val = {
    cat:"Mistigri",
    dog:"Rex",
    butler:"Jeeves" // There's no extra comma
  }

JSLint to the rescue

Programmieraffe told me about JSLint. You paste your javascript code and it verifies it for you. Not only for extra-commas but everything else.