How to preview an HTML page which has tables, inside a <div> tag?

here is the sample code:

Code:
function preview(xmlHttpRequestObj){
// ...
var divEelement = document.getElementById("div-tag-id");

divElement.innerHTML = xmlHttpRequestObj.responseText;// 1

}
It works fine if the HTML page, stored in responseText, does not have <table> tag.
htmlf:...