1
ParamQuery Pro Evaluation Support / Problem encountered using POST Parameters with Paging?
« on: January 13, 2016, 03:55:25 am »
If I do not pass any POST parameters as shown in the code below:
var dataModel_brands = {
location: "remote",
dataType: "JSON",
method: "POST",
url: "/test_ajax.php",
getData: function (dataJSON) {
var data = dataJSON.data;
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data };
},
sortIndx: ["name"]
};
My Ajax class receives these POST parameters: pq_datatype=JSON&pq_curpage=1&pq_rpp=20
But if I pass my own POST parameters which are needed as shown in the code below:
var dataModel_brands = {
location: "remote",
dataType: "JSON",
method: "POST",
getUrl: function() {
return { url: "/test_ajax.php", data: {a : 'fetch_brands', usr : 'username'} };
},
getData: function (dataJSON) {
var data = dataJSON.data;
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data };
},
sortIndx: ["name"]
};
My Ajax class only receives these POST parameters: a=fetch_brands&usr=username
For some reason the parameters needed for paging are not appended ?
Have I done something wrong or have I found a bug?
Thanks
var dataModel_brands = {
location: "remote",
dataType: "JSON",
method: "POST",
url: "/test_ajax.php",
getData: function (dataJSON) {
var data = dataJSON.data;
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data };
},
sortIndx: ["name"]
};
My Ajax class receives these POST parameters: pq_datatype=JSON&pq_curpage=1&pq_rpp=20
But if I pass my own POST parameters which are needed as shown in the code below:
var dataModel_brands = {
location: "remote",
dataType: "JSON",
method: "POST",
getUrl: function() {
return { url: "/test_ajax.php", data: {a : 'fetch_brands', usr : 'username'} };
},
getData: function (dataJSON) {
var data = dataJSON.data;
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data };
},
sortIndx: ["name"]
};
My Ajax class only receives these POST parameters: a=fetch_brands&usr=username
For some reason the parameters needed for paging are not appended ?
Have I done something wrong or have I found a bug?
Thanks