Note that there are some explanatory texts on larger screens.

plurals
  1. POBug with combination of: jQuery 1.4, ajax/json, Firebug Lite and IE 8
    primarykey
    data
    text
    <p>I had just about concluded that jQuery's ajax calls wouldn't work with JSON data in IE 8, no matter what I tried. I found that I could use the jQuery 1.3.2 library and this fixed the problem, but 1.4 simply would not play ball with JSON ajax requests. Even when the JSON data returned was so simple that there was no question of it being in an invalid format. For example:</p> <pre><code>{"x":"a"} </code></pre> <p>This was regardless of whether I used a Java servlet to return the JSON data, or a simple, canned text file. Regardless of dataType or contentType. Regardless of GET vs POST. Regardless of whether I used $.ajax or $.getJSON. And it all works in Firefox 3.6.</p> <p>Then it dawned on me to take out the reference to Firebug Lite and IT WORKED! Suddenly the problem vanished. It worked regardless of tinkering with the contentType in the response (in the servlet that is), or of the dataType I specify in the request.</p> <p>The problem returns if I link to Firebug Lite again...even if my code never actually uses it.</p> <p>Has anyone seen this kind of behavior, and does anyone have a fix or workaround? I'd hate to have to stop using Firebug Lite. Thanks for any insight. Again, the problem only occurs when you combine jQuery 1.4, Firebug Lite, JSON data, and IE 8.</p> <p>Here is the ajax call to a servlet, if it matters:</p> <pre><code>$.ajax({ cache: false, url:"http://localhost:8080/Performance_Reporting/TestServlet", type:"GET", contentType: "application/json", dataType: "json", timeout:30000, success: function(d, status, req) { $("#result").text(d.x); }, error: function(req, status, err) { $("#result").text(req.responseText); } }) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload