1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    3
    Vote Rating
    0
    krishnavamsim is on a distinguished road

      0  

    Default Unanswered: Problem with Json Response

    Unanswered: Problem with Json Response


    hi all,
    i am working in json PHP ,php code was perfect. but when it came to JS Some prefix (5) added to my JSON Response
    ex:- 5{ a: 10, b: 20}

    5 is not there in my php code .
    Please solve my problem.
    thanks in advance
    vamsi krishna

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Answers
    31
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    So you're saying that when you view the response in Chrome Developer Tools or Firebug, there is literally a "5" appended to the beginning of the responseText?

    If so, that's a server-side issue...perhaps something in your application software is prepending that character. Ext JS (and JavaScript, for that matter), has nothing to do with the format or the content of the response that you receive from an AJAX request. All that Ext JS does is to read the response after it arrives and do whatever you've told it to do with the response.
    Before pasting your code, see if you can make a working example using Sencha Fiddle: https://fiddle.sencha.com/

    Not only will it let everyone see what you're talking about with their own eyes, but it also makes debugging your issue 19 billion times easier

    Embedding your newly created Fiddle is super-easy: Using Sencha Fiddle in the Forums

  3. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    3
    Vote Rating
    0
    krishnavamsim is on a distinguished road

      0  

    Default


    hi sir,
    thanks for quick response.

    Same code i Executed in Office system but it Execute perfectly. But My home only I got this problem
    yesterday its came '5' only. but today same code i got '555675456675555' before the json response.

    1.Code was Same
    2. Xampp Was same version

    diff is OS in my office Windows XP 32bit and My System was Windows 8 64bit
    please do needful
    thanks in advance

    vamsi krishna

  4. #4
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Answers
    31
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Sorry, no idea. Maybe you can post your PHP code, or post the same question on a PHP forum?
    Before pasting your code, see if you can make a working example using Sencha Fiddle: https://fiddle.sencha.com/

    Not only will it let everyone see what you're talking about with their own eyes, but it also makes debugging your issue 19 billion times easier

    Embedding your newly created Fiddle is super-easy: Using Sencha Fiddle in the Forums

  5. #5
    Sencha User
    Join Date
    Sep 2013
    Posts
    3
    Vote Rating
    0
    krishnavamsim is on a distinguished road

      0  

    Default


    hi,
    at last i found proble this is Xampp Version problem. in my office Xampp 1.7.7 and my house having latest version so some tags are deprecated. that's why its not working.

    Thank you for your support.
    Vamsi Krishna

Thread Participants: 1