I create a table programmatically in javascript like this and do a innerhtml on a div. It works fine in firefox but IE screws things up. Obviusly the sucker exists in IE. But when I inspect the thing in IE8 I see that a class and a id on link element is without ", but they should be there. Can these be the problem?
var create_table = function(rows, len, bilder, texter, mediaids, url) {
var table = '<table>';
for (var i = 0; i < len; i++) {
if (i % rows == 0) {
table += '<tr>';
}
table += '<td><h4><a id="' + mediaids[i].toString() + '" class="medialinks" href="#" >' + texter[i].toString() + '</a></h4><img src="' + bilder[i] + '" ><td>';
if (i % rows == rows) {
table += '</tr>';
}
}
table += '<table>';
return table;
}
Can anyone spot an error?