View Full Version : how is the output format of php response to ajax request of grid

15 Aug 2012, 9:20 PM
here is grid which data store is ajax. when i use static text file, it works fine. here is the code of url definition:
url: mytext.txt
and the content is:
"items": [
"duty_id": 1,
"ptype": "MEETING",
"duty_id": 2,
"ptype": "VOCATION",
"duty_id": 3,
"ptype": "MEETING",
but when i use php to generate the same text, the web page is always loading.
what is the output format of php response ?

15 Aug 2012, 9:30 PM
sorry i made a mistake. response data must include column name like this:
"duty_id": 3 not only 3.

16 Aug 2012, 9:28 AM
include success: true in your result json

$return = array(
'success' => TRUE,
'data' => $data

$return = json_encode($return);