Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE 7/8 parsererror (json)

    Hi everyone

    I'm in the middle of identifying why IE7 and IE8 produce an error when a lot of data is returned on the client side.

    There's an AJAX call which queries a database, loops through the results and creates a json object ( using the JSON library for Java).

    Now on the client side ( javascript) I loop through each "row" and print the result.

    Using firebug's response I copy the entire string and check with jsonlint and the json returned shows as valid.

    With Firefox, Safari and Opera I get no errors whatsoever when the json is processed.

    With IE7/IE8 when the resuls are somewhat greater (don't know the exact number) than 1850 I get a parsererror.

    Any idea why this might be happening?

    The returned string from the servlet is a json object "rows" which is a JSONArray and javascript loops through each element and processes the results.

    When debugging in IE, the ajax call does goes directly to the error callback function and not the success callback function.
    I'm using jquery 4+


    Any suggestions/advice/solution are welcome
    Thanks

    Andreas

  • #2
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Figured out why.

    for anyone, out there wondering what the problem was:


    It turned out that some of my data had non-ascii characters, (french, german etc),

    Firefox and Safari were showing these as question marks. IE would give a parsererror.

    Changing my servlet's response character encoding to UTF-8 fixed everything..

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Hi kkudi

    How do you change your servlet's response character encoding to UTF-8 fixed everything?

    Regards!!!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •