views:

62

answers:

1

I have a photographer's gallery here.

In my friends, Firefox and Safari, everything is smooth. However, IE8 seems to not call the callback after the XHR has loaded (if it has, I tried checking with Fiddle, but couldn't get my head around whether it has actually loaded or not).

It just seems to sit there loading forever. I'm not sure what I've done wrong and how to fix it. Does anyone have any suggestions? It may be best to check first with Firefox, so you know how it is supposed to work.

Thanks!

+2  A: 

It's making the request just fine, but the JSON IE8 is getting is malformed, so the callback never happens. The jQuery.getJSON() documentation mentions: "As of jQuery 1.4, if the JSON file contains a syntax error, the request will usually fail silently."

The response looks like this to me (for id 13):

461
{"title": (etc.)}
0

Firefox somehow doesn't seem to have a problem with those numbers, though, and I don't get them at all in Opera, so I'm not sure what your PHP script is doing there.

If I remove the leading and trailing numbers (using Fiddler's AutoResponder), the callback succeeds in IE too.

mercator
Thanks so much!
alex