473,414 Members | 1,628 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

building dynamic tables cells and specifying colspan

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
Jul 20 '05 #1
1 29842
"rsd" <rs******@yahoo.com> wrote in message
news:63*************************@posting.google.co m...
<snip>
table = document.all["resTable"]; <snip> ... ect, but
"td.colspan=3" just doesnt work.


td.colSpan = 3;

The S of Span should be upper case.

Richard.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Debbie Davis | last post by:
Greetings, I have a table called locations which holds 9 store locations. I am at my wit's end trying to format these like this: centered City Name(named once) store store store store
38
by: Kirk | last post by:
Having spent hours on end sorting out layout issues caused by having different amount of cells in different rows, I've finally got a webpage looking as it should. However, when I add an image to a...
2
by: The_Original_MB | last post by:
I have a task to create tables dynamically, using the javascript DOM. The current method uses a 1px x 1px IFRAME to loop through some data generation stuff, and then call JS functions in the parent...
1
by: Carlos Gomez | last post by:
I used to develop with Classic ASP. Now I'm learning ASP.NET I used to create tables 'on-the-fly' using recordsets. My code would loop through the recorset.Fields to make the headers. If I added...
0
by: Jim in Arizona | last post by:
How could I dynamically create a button within a loop that holds a specific field from a database? I have a webform that loops through the records in related tables of an SQL database. I've been...
8
by: Mark VB | last post by:
Hi, I'm trying to create a table with two (equally wide) columns. Except for the first row, which should contain 3 columns with the first and third cell having a fixed width. Something like...
3
by: Phil | last post by:
I'm trying to make a 4 x 13 table in html, but it won't format correctly... maybe someone can see what I'm doing wrong. <table border="1"> <tr> <td colspan="3" rowspan="5">Cell 1, 1</td> <td...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
2
by: pinson.nick | last post by:
I've been playing around with dynamic tables for the last couple days and have run into some interesting issues. I know how to work around this issue, but was wondering if anyone had any insight as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.