I have been trying for many years to insert my html table into the lower main iframe with no success. Here is my javascript code:
Code:
<a href="javascript:Display_Table()" target="main">Constellations</a>
<script type="text/javascript">
function Display_Table(){
var numOfCells = 88;
var columns = 8, rows = Math.ceil(numOfCells / columns), content = "", count = 0;
content = "<table border='1' cellspacing='1' cellpadding='5'>";
for (r = 0; r < rows; r++) {
content += "<tr>";
for (c = 0; c < columns; c++) {
content += "<td><a HREF='javascript:DisplayConstellations(" + count + ");'>" + ConName[count] + "</a></td>";
if (count == numOfCells)break; // here is check if number of cells equal Number of Pictures to stop
count++;
}
content += "</tr>";
}
content += "</table>";
document.body.innerHTML = content;
}
</script>
Comment