Problems on IE8

Problems on IE8

lundstrolundstro Posts: 8Questions: 0Answers: 0
edited September 2010 in General
Hello,

I´m using DataTables with web2py and don´t have any problems with Firefox. But with IE8 I have. Can´t get it to display data everytime. Sometimes it shows and some times it says "Datatables warning: JSON data from server failed to load or be parsed. this is most likely to be caused by a JSON formatting error".

I looked at the JSON data in both Firefox and IE and they look a like, identical.

Where should I start looking for the problem. I upgraded DataTables to 1.7.2. but no luck.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Does your json pass http://jsonlint.com ? It might be this: http://datatables.net/faqs#comma

    Allan
  • lundstrolundstro Posts: 8Questions: 0Answers: 0
    Removed the comma but it didn´t help. So I tested jsonlint.com and my JSON data didn´t pass. So I guess I have to study the JSON format a little more.

    Do you have some examples that I could look at.

    My JSON data look like this:
    {"iTotalRecords":3, "iTotalDisplayRecords":2, "aaData": [ ["Kenneths", "177 / 0 / 267", "3 / 0 / 3", "0 / 0 / 0", "0 / 0 / 0", "0 / 0 / 0", "0 / 0 / 0", "", ""], ["Sarin testiLPK", "4865 / 5260 / 1240", "0 / 0 / 0", "0 / 0 / 0", "0 / 0 / 0", "0 / 0 / 0", "0 / 0 / 0", "", ""] ]}
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    That looks valid to me. You are missing sEcho from the reply though: http://datatables.net/usage/server-side

    Allan
  • lundstrolundstro Posts: 8Questions: 0Answers: 0
    Thanks Allan, I hate this but now it works without me knowing why.

    I removed the comma but it didn´t help. Now four hours later when I´m ready to continue looking for the problem everything is working.


    Kenneth
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Heh - that's the way it goes sometimes :-(. Browser cache is the usual suspect... However, :-) it's working!

    Allan
This discussion has been closed.