开发者

What is going wrong with this XHR request in IE8?

I have a photographer's gallery here.

In my friends, Firefox and Sa开发者_运维技巧fari, 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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜