Unable to Get Exact Match in datatable
Unable to Get Exact Match in datatable

I am trying to achieve Exact Search in the Datatable. Presently I am passing a value to 'Search' field from another Jquery function. This is working quite fine. Now I am trying to achieve the EXACT SEARCH in the Datatable. Here is my code block --
$(document).ready(function () {
var query = getUrlVars()["query"];
var table = $('#q2').removeAttr('width').dataTable({
"search": {"search": query,
"regex": false,
"smart": false},
"ordering": true,
"language": {"zeroRecords": "No records to display"},
ajax: 'logapi.php?query=query_02',
fixedHeader: true,
deferRender: true,
scroller: true,
processing: 'Loading...',
autowidth: true,
responsive: false,
orderClasses: false,
columnDefs: [{ width: 100, targets: 0 }],
fixedColumns: true
But while trying to pass the value "ART_SUP_PACK" to search field, it is returning 2 rows contains "ART_SUP_PACK" & "ART_SUP_PACK_V" i.e. Exact Search not working as expected.
What I am doing wrong here? Am I missing something?
This discussion has been closed.
Answers
Hi @rit_netsys ,
This thread should help, it's asking the same thing.
Cheers,
Colin
Hi @colin ,
I Tried like this. But this is not working. Am I doing something wrong?
Hi @rit_netsys ,
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
Hi @Colin,
I tried with live.datatables.net. But unable to replicate the scenario exactly. Can you help me out? Here is the edited link - http://live.datatables.net/titobage/1/edit
You are getting this error in the console:
Uncaught ReferenceError: getUrlVars is not defined
Kevin