Problem
A script that otherwise is interpreted by other major browsers (Chrome/ Firefox) without problems, prompts Internet Explorer to issue an error along the lines of:
SCRIPT1002: Syntax error
edit-snapshot, line 2230 character 1
Analysis
I think this error can broadly be interpreted as: there is some seriously illegal markup in your script (according to IE’s definition)
Solution
The script error will usually (unhelpfully) point to the end of the script definition, the </script> tag. Essentially, the best strategy I could come up with, to sift through your script and search for anything unusual. For instance:
- Does your JavaScript define new ‘<script></script>’ elements by using the exact string ‘<script>’
- Does your JavaScript markup resembling HTML/XML style comments, such as `<!–‘ or ‘–>’
Dude, you saved my day. I have been fighting this error for 3 days. I was missing the closing tag of script. 😦 Cheers mate
Same here I fought for 5 hours and failded, then try google and I find this solution.
Thanks a lot.
Great to hear that it’s useful :)! Thanks!