javascript - Datatables.js ajax call hangs site -
i use php symfony 3 datatables.js plugin tables rendering on site , come across following issue: when try data server via ajax
call, site hangs until ajax request finished. ajax call rather long - 20 seconds, , while in progress cannot open new tab in browser load other page of site. checked server (i use xampp windows) , saw not loaded 100%. suppose synchronous ajax call blocks browser further processing. use following code:
hanbdbookdatatable = $(statdatatableid).datatable({ bfilter: false, "bsort": false, pagelength: 10, fixedheader: true, "processing": true, "serverside": true, "ajax": { "async":true,//no effect "url" : ajaxurl, "type": "post", "data": function(d) { d.type = 'search_stat'; d.search_conditions = readsearchdatainput(); } }, "order": [[ 0, "desc" ]], "columns": [ {"data": 'row_id', "searchable": false, "bsortable": true}, //...my columns... {"data": 'button', "searchable": false, "bsortable": false}, ], language: { url: language_path }, "drawcallback": function( settings ) { console.log('datatables has redrawn table.'); } });
any ideas how fix welcome
upd_1 got server problem not occur, might not datatables. checked request headers on both servers , same. ideas why problem may persist welcome. thank you
Comments
Post a Comment