-
15 Aug 2012 9:20 PM #1
Unanswered: how is the output format of php response to ajax request of grid
Unanswered: how is the output format of php response to ajax request of grid
hi
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",
"begin_date":'2012-04-05',
"end_date":'2012-04-06',
"pdesc":"desc1"
},
{
"duty_id": 2,
"ptype": "VOCATION",
"begin_date":'2010-04-05',
"end_date":'2010-04-06',
"pdesc":"desc2"
},
{
"duty_id": 3,
"ptype": "MEETING",
"begin_date":'2011-04-05',
"end_date":'2011-04-06',
"pdesc":"desc3"
},
]
}
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 #2
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 #3Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,186
- Vote Rating
- 194
- Answers
- 433
include success: true in your result json
Scott.Code:$return = array( 'success' => TRUE, 'data' => $data ); $return = json_encode($return);


Reply With Quote