I have a page that contains an element, <displayedimage>
, that is not getting updated using jquery's document.ready/$.getJSON funcitonality in IE 6 and IE 8 (probably IE 7 too even though I haven't tested). This same piece of funcitonality works fine on XP Safari and OS X Safari, OS X Chrome, OS X Opera, etc. So, here's what happens:
I have an element, , that is empty on first load, but gets populated by a javascript method executed by document.ready:
<div id="imagecontrol">
<displayedimage></displayedimage>
</div>
gets updated by:
function loadFirstImage() {
$.getJSON("/servlet/access/image/" + id,
function(json) {
$("displayedimage").html("<a href=\"/servlet/images/" + json.images[0].filename + "\"><img src=\"/servlet/images/s_" + json.images[0].filename + "\"></img></a>");
$("imagelabel").html(json.images[0].label);
});
}
As stated, this system works fine in OS X Safari, OS X Chrome, OS X Opera, XP Safari, but doesn't seem to do anything in XP IE. I've performed simple debugging (alert("loadFirstImage called") in the loadFirstImage method and it gives me an alert, so it seems that it might be some .getJSON issue? Any suggestions on where to start with something like this? Thanks.