That sounds like a syntax error in your js. You might try copying the js elsewhere, and try running it, which would give you a better clue about what the syntax error is. I use spidermonkey for that, but jsfiddle + the browser console would probably work. If you have no syntax error, the script should crash with a ReferenceError talking about undefined functions. If you have a syntax error, it should tell you the line and the nature of the problem. Unexpected identifier generally comes from not closing a ) or }, missing a ;, or breaking up an if/else or try/catch.