Focal Point
[SOLVED] Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL (JQuery / Javascript)

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6367082376

October 27, 2014, 05:14 PM
A Fisher
[SOLVED] Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL (JQuery / Javascript)
I pounded my head against this issue for hours before I finally happened upon the (embarassingly) simple solution.

On our development environment we employed accordions for a long, multi-part report. Professional Services employed JQuery for this purpose, providing a sharp look and easy configuration.

Upon trying to migrate this code/script from Development to Test, I found I was unable to get it to function within Chrome. I ensured that I had copied everything to the correct folders, etc etc.

Finally, using Chrome Web Development tools I saw that the error that was being generated was "Uncaught Syntax Error: Unexpected Token ILLEGAL".

A search of this error description pointed me to StackOverflow.com - somehow in the process of copying the JS from Dev to Test caused what appears to be a 0-length space to be appended to the end of the file. Upon editing the file (JQuery.js for my case) within Notepad++ you can see a line that appears to be empty. Removal of that final line causes everything to work correctly.

I don't know how / when that character got appended to the end of the file: I had copied the folder structure using copy and paste within Windows / Remote Desktop. I believe I also attempted w/ Change Management w/ the same results. The original script does not have this additional line.

See here for more information :
Stack Overflow Solution

Hopefully this will save someone else the grief caused me.


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS