Internet Explorer won't append table rows using appendChild
I have tried the code which Vlaad has resolved saying that tbody tag to tr resolved it but I am still facing this issue on IE , hear the code
var tbody = document.createElement('tbody');
var link = document.createElement('a');
var span = document.createElement('span');
var txt = "EPSON GPS Receiver Module S4E398600010000";
var image = document.createElement('img');
var tr = document.createElement('tr');
var td = document.createElement('td');
link.setAttribute('href','#1');
span.setAttribute('class','editorialQuickLinkTitle');
link.innerHTML = txt;
span.appendChild(link);
image.setAttribute('src','/Images/Logos/Miniatures/epson.png');
image.setAttribute('border','0');
image.setAttribute('vspace','5');
image.setAttribute('hspace','5');
td.setAttribute('class','block');
td.appendChild(span);
td.appendChild(document.createElement('br'));
td.appendChild(image);
tr.appendChild(td);
tbody.appendChild(tr);
document.getElementById("previews").appendChild(tbody);
Please let me know what went wrong...
Thanks, in advance.....
|