My page has a table with a single row with 7 cells for a calendar. I'm trying to add a row with js which will span the 7 cells using createElement. Here's the code:
The text for the variable month_year always ends up in the first column, and the other 6 columns are spanned.
What am I doing wrong?
All help is appreciated.
Code:
var row = document.createElement("TR")
with(row.style){
backgroundColor = "#FFFFFF";
}
var tdmoyr = document.createElement("TD")
with(tdmoyr.style){
height = 40;
width = 85;
colspan = 7;
}
tdmoyr.innerHTML = "<height='40' colspan='7' align='center' valign='middle'><p class='homehdrtext'><b>" + month_year +"</b></p>"
row.appendChild(tdmoyr);
tbody.appendChild(row);
The text for the variable month_year always ends up in the first column, and the other 6 columns are spanned.
What am I doing wrong?
All help is appreciated.