Search-illegal characters
Search-illegal characters
ofirk12
Posts: 15Questions: 8Answers: 1
in DataTables
When i copy number from the phone call(during the call ) and past in the search i get this error " illegal mix of collation for operation like" i think that it copies the number with some hidden illegal characters , how can i do that before the search all the illegal characters will be deleted from the string ?
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
What phone call? And what number are you copying? I feel like there is a fair amount of information we are missing on this support question .
Allan
Hi @ofirk12 ,
This SO thread talks about stripping non-numeric numbers from a string. You could do this in
initSubmit
to cleanse the data.If that doesn't help, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Sounds like you are wanting to sanitize the data pasted into the Datatables default global search input. If so you can use the code in this example to take over the search event and use the SO technique Colin linked to remove the extra characters.
http://live.datatables.net/jorexujo/1/edit
Kevin