ajax - converting to JSON Stringify -




i working on data tables server side processing . in ajax call sending data , changing values on next call of pagination.

this ajax call code in datatable,

"ajax": {     url: "getbasiccallanalysisdata.json",     data: function(d) {         return $.extend({}, d, {             "newrequest": newreq,             "totalrecords": total,             "phone": anumber,             "from_date": startdate,             "to_date": enddate         });     },     type: "post",     error: function() {         alert("error");     },     complete: function(data) {         total = data.responsejson.recordstotal;         newreq = 0;         test(total, newreq);         $("#loading_image").hide();         $(".show_datatable").show();     } } 

in data attribute need convert returned values in json.stringify because on server side handles strings not json objects.

i using not working using link:

return json.stringify({}, d, {                             "offset": 0,                             "newrequest": newreq,                             "totalrecords": total,                             "lookincol": "anumber",                             "lookinval": anumber,                             "fromdate": startdate,                             "todate": enddate                         }); 

any idea, how can convert function(d) returned values strings , pass data attribute ?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -