I am having the problem of updating a table cell value using jQuery 1.4.2. it all works in Firefox and Safari, but IE8 and IE9 just don't do anything. There are no warnings, errors or anything that would give me some hint on where to look for it.
The table is as follows:
<table id="test"> <tr id="1"> <td id="name">sample name</td> <td id="schedule">sample value</td> <td id="day">sample value</td> </tr> <tr id="2"> <td id="name">sample name</td> <td id="schedule">sample value</td> <td id="day">sample value</td> </tr> <tr id="3"> <td id="name">sample name</td> <td id="schedule">sample value</td> <td id="day">sample value</td> </tr> </table>
I make an ajax call and get json data:
{"Test": [ {"id":"1", "name":"John", "day":"Monday"}, {"id":"2", "name":"Marry", "day":"Thursday"} ]}
after receiving the data, there is a loop that iterates through the json dataset and updates the corresponding column with the received data as follows:
$.each(json.Tests, function(){ var test = this.hash; $("table#test tr[id=" + test + "]").find("#name").html(this.name); $("table#test tr[id=" + test + "]").find("#schedule").html(this.status); $("table#test tr[id=" + test + "]").find("#day").html(this.changed); });
As I mentioned, this has been tested in Safari and Firefox, everything works fine, but IE8 and IE9 don't seem to do anything.
source share