Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81989

Search name with apostrophe inside mysql datatable.

$
0
0

Hi,
i'm using datatable plugin and works well except when i try to search records that contains apostrophs.
The problem is that the
$requestData['search']['value'])
doesn't pass the apostroph from the ajax function i have in the master file...

This is the code in the master page:


$(document).ready(function() { $.fn.dataTable.moment( 'DD/MM/YYYY'); $("#search").html($("#search").html().replace(/’/g, ''')); var dataTable = $('#<? echo $sezione; ?>-grid').DataTable( { language: { search: "Cerca" , "info": "Comuni in elenco: _TOTAL_", "sLengthMenu": "Mostra _MENU_ Comuni per pagina", paginate: { "next": "<i class='fas fa-arrow-alt-circle-right'></i>", "previous": "<i class='fas fa-arrow-alt-circle-left'></i>", } }, "processing": true, "serverSide": true, "stateSave": false, "searching": true, "ajax":{ url :"<? echo $sezione; ?>-grid-data.php", // json datasource type: "post", // method , by default get error: function(){ // error handling $(".<? echo $sezione; ?>-grid-error").html(""); $("#<? echo $sezione; ?>-grid").append('<tbody class="<? echo $sezione; ?>-grid-error"><tr><th colspan="3">Nessun dato presente.</th></tr></tbody>'); $("#<? echo $sezione; ?>-grid_processing").css("display","none"); } } } ); });

any help for me?
Thanks in advance


Viewing all articles
Browse latest Browse all 81989

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>