building dynamic tables cells and specifying colspan

R

rsd

how do you specify the "colspan" attribut of a <td> cell when building
the table/rows/cells dynamicly?

ie: lets say we have the follwoing code:

table = document.all["resTable"];
// header row
tr1 = table.insertRow();
td1 = tr1.insertCell();
td1.innerHTML = "this is the header row";
// data row
tr2 = table.insertRow();
td1 = tr2.insertCell()
td1.innerHTML = "column one";
td2 = tr2.insertCell();
td2.innerHTML = "column two";
td3 = tr2.insertCell();
td3.innerHTML = "column three";

for the 1st row's only cell, how would you specify the colspan for the
cell?
normal in HTML it would be <td colspan=3>. i can specify different
atributes by using "td1.height", "td1.style.background", ect, but
"td.colspan=3" just doesnt work.

also, this will only be used with ie browsers, thanks for any help,

rsd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top