By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,288 Members | 1,695 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,288 IT Pros & Developers. It's quick & easy.

building dynamic tables cells and specifying colspan

P: n/a
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
normal in HTML it would be <td colspan=3>. i can specify different
atributes by using "td1.height", "", ect, but
"td.colspan=3" just doesnt work.

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

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"rsd" <rs******> wrote in message
news:63************************* m...
table = document.all["resTable"]; <snip> ... ect, but
"td.colspan=3" just doesnt work.

td.colSpan = 3;

The S of Span should be upper case.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.