I'm getting this error (apparently from the data back) :
Uncaught Error : SyntaxError: Unexpected token < pqgrid.min.js:9
g.remoteRequest.xhr.h.ajax.error pqgrid.min.js:9
jQuery.Callbacks.fire jquery-1.10.2.js:3048
jQuery.Callbacks.self.fireWith jquery-1.10.2.js:3160
done jquery-1.10.2.js:8237
jQuery.ajaxTransport.send.callback jquery-1.10.2.js:8778
So the table is populating correctly, just seeing the error in the console (debugger)
Here is the data back from the PHP.... captured with debugger in PHP - I validated here
http://jsonlint.com/:
{"data":[{"id_studies":"12","country":"usa","study_name":"O34232","category_table":"Healthy","summary_table":"D-alanine mouthrinse medication","gender_table":"Male, Female","age_table":"18 - 30","compensation_table":"Volunteer - $3,300; Partner - $1,200","length_table":"Volunteer 13 overnights and 4 follow up; Partner 4 follow up appointments","qualifications":"Males, Age: 18-30, BMI:18-32, No children living at home, You must be a non-smoker","minimum_age":"18","maximum_age":"30","status":"","study_details":"<p><strong>Category<\/strong><\/p>\r\n<p>Healthy<\/p>\r\n<p><strong>Description<\/strong><br \/>\r\n<\/p>\r\n<ul>\r\n<li>You must be available for 13 clinical overnight stays, plus 4 follow-up visits<\/li>\r\n <li>You must be in a committed relationship<\/li>\r\n <li>Your partner must be available for 4 follow-up visits<\/li>\r\n<\/ul>\r\n<p><strong>Qualifications<\/strong><br \/>\r\n<\/p>\r\n<ul>\r\n <li>Males<\/li>\r\n <li>Age: 18-30<\/li>\r\n <li>BMI:18-32<\/li>\r\n <li>No children living at home<\/li>\r\n <li>You must be a non-smoker<\/li>\r\n<\/ul>\r\n<p><strong>Age<\/strong><br \/>\r\n 18 - 30<\/p>\r\n<p><strong>Duration<\/strong><br \/>\r\n Volunteer 13 overnights and 4 follow up; Partner 4 follow up appointments<\/p>\r\n<p><strong>Reimbursement<\/strong><br \/>\r\n You may be compensated for time\/travel up to $3,300 for male treated subjects; $1,200 for their partner. Refer a qualified subject for this study receive $500.<\/p>\r\n","sort_order":null}] }
PHP Code:
echo "{\"data\":". json_encode( $rows ) ." }" ;
dataModel:
studyObjTbl.dataModel = {
dataType: 'JSON',
location: "remote",
method: 'POST',
sorting: "local",
sortIndx: "id_studies",
sortDir: "up",
url: 'php/TransactionHandler.php?transActionID=listStudies&team=USA',
getData: function (response, textStatus, jqXHR) {
return { data: response.data };
}
};
Any insight? Thanks