1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    Shanghai, China
    Posts
    21
    Answers
    1
    Vote Rating
    1
    tianhao is on a distinguished road

      0  

    Default 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 ?

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Location
    Shanghai, China
    Posts
    21
    Answers
    1
    Vote Rating
    1
    tianhao is on a distinguished road

      0  

    Default


    sorry i made a mistake. response data must include column name like this:
    "duty_id": 3 not only 3.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,642
    Answers
    615
    Vote Rating
    401
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    include success: true in your result json

    Code:
    $return = array(
        'success' => TRUE,
        'data' => $data
    );
    
    $return = json_encode($return);
    Scott.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar