Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35272

Using Datatable, Bootstrap with jquery $.get (PHP & SQLSRV)

$
0
0

Hi guys,

I want to use DataTable with Bootstrap theme to display my table result (PHP & SQLSRV) where it will be loaded into div using jquery $.get function.

I tried below code but it didn't work. Below is my code for jquery and appreciated if you can provide me some solutions here.

$(document).ready(function () { $("#getData").on('click', function () { var report = $(this).val(); if (report == 'tput') { var tputpage = 'reports/dtput.php', dstrt = $('#from_date').val(), dend = $('#to_date').val(); $.get(tputpage, { dstrt:dstrt, dend:dend }, function (data) { $('.target').html(data,function(){ $('table').dataTable(); }); }); } });


Viewing all articles
Browse latest Browse all 35272

Trending Articles