Return response failing

3 posts, 0 answers
  1. Vivek
    Vivek avatar
    13 posts
    Member since:
    Aug 2011

    Posted 23 Apr 2012 Link to this post

    Hi,
    My save handler generates JSON correctly (PHP code used to generate the JSON below). but I still get an upload error. The actual file is uploaded successfully.
    $var_OutputArray = array('attachid'=>$attachment->AttachmentID, 'mod'=>$attachment->ModuleCode,'tic'=>$attachment->Type);
    header('Content-type: text/plain');
    echo json_encode($var_OutputArray);

    An example of JSON output which generates the error is
    {"attachid":"labgh3v1din96yfk","mod":"prj","tic":"ticket"}

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2834 posts

    Posted 24 Apr 2012 Link to this post

    Hello,

    Everything seems fine with the server response. That said, a Fiddler capture will be appreciated as it will ensure that we're not missing something.

    What happens if you try to request the handler using $.getJSON()?

    Regards,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Vivek
    Vivek avatar
    13 posts
    Member since:
    Aug 2011

    Posted 25 Apr 2012 Link to this post

    As it turns out, the problem was in the error handler. It's solved now ... thanks!
Back to Top