Link to home
Start Free TrialLog in
Avatar of Bob Schneider
Bob SchneiderFlag for United States of America

asked on

JQuery Data Table Question

I use data tables to display results of races that we time on a classic asp website (https://www.gopherstateevents.com/results/fitness_events/results.asp?event_type=5&event_id=883&race_id=1516).  This weekend the results of one of our bigger races showed a Data Table error until I figured out that one person's name was incorrectly entered, with a "/" inserted (ie: Johns/on).  There were no issues in the way the results were calculated and displayed everywhere except in our data tables.

Here is my question:  Are there other characters that will prevent JQuery data tables rendering?  Also, should I build some error trapping in to prevent these characters (ie: Replace(FirstName, "/", "").  Seems like a lot of processing for something that is so unlikely to happen?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I figured out that one person's name was incorrectly entered, with a "/" inserted (ie: Johns/on).  There were no issues in the way the results were calculated and displayed everywhere except in our data tables.

I tried to reproduce without success.
Data is data, until producing invalid JSON, you should not have any issue. For some reason your JSON was not valid and it throw a JavaScript error, it's not about DataTables but about producing valid JSON data.
Avatar of Bob Schneider

ASKER

Thank you both!
Hi,

I just want to say that if you use Datatables filter or Yadcf filter you may need to select the appropriate settings
for example you can set the value to have HTML or not
You may also need specific ordering  pluging when dealing with date and special characters

So you need to check with all Datatables plugins you are using and often check the broswer console for errors ...
right click / inspect check console tab
You have 3 errors on your page  uncaught SyntaxError: Unexpected token '<'