tablesorter icon indicating copy to clipboard operation
tablesorter copied to clipboard

Uncaught SyntaxError: Unexpected token <

Open codeofsumit opened this issue 10 years ago • 4 comments

i tried to figure this one out myself but i'm stuck. As soon as i include tablesorter.js (production and development versions) I'm getting this error:

Resource interpreted as Script but transferred with MIME type text/html: pathToTablesorter.js Uncaught SyntaxError: Unexpected token <

I researched but i couldn't figure it out. It's defenitely not a problem with my server as 20 other JS files load correctly.

It's included like this <script src="js/tablesorter.min.js"></script>

If i open tablesorter in eclipse, everything looks fine. If I open it in chrome dev tools, i see my web-page HTML. Maybe i did a stupid mistake somewhere but unless I'm totally blind, the script-tag is fine.

Is tablesorter - by itself without initializing it in javascript - rendering the DOM allready by just being included? Because my tables are created and populated via AJAX and they're not complete on page load (the HTML my be invalid if tablesorter checks the tables on page load automatically).

codeofsumit avatar May 26 '14 10:05 codeofsumit

+1

dougfarre avatar Aug 16 '14 08:08 dougfarre

@codeofsumit can you check the encoding is not UTF8 BOM instead of UTF8?

lukewatts avatar Sep 13 '18 17:09 lukewatts

@lukewatts the issue is over 4 years old. I don't use the library anymore

codeofsumit avatar Sep 14 '18 10:09 codeofsumit

@codeofsumit True. @christianbach should be closing all these issues and maybe marking the library deprecated or unmaintained...

lukewatts avatar Sep 17 '18 06:09 lukewatts