Changing the value of a cell in a table 
Author Message
 Changing the value of a cell in a table

Can someone tell me how to change the value of a cell in a table from within
a function?

Example-
If I was to select a value from a Select List and place that value into a
specific cell every time a new value was selected.

Thank you for your time....
Dennis



Tue, 17 Dec 2002 03:00:00 GMT  
 Changing the value of a cell in a table
Try
document.all.YourTableName.rows(j).cells(j).innerText="yadayadayada"

Where:
on the Table definition:
<TABLE id=YourTableName>
i points to the desired row
j points to the desired cell
Note both i and j are relative to zero not one, so for first row j = 0

You can also name each cell <TD id=cellname>  
document.all.cellname.innerText="yadayadayada"  
--
Arn
http://www.injersey.infi.net/~arneb/

Quote:

> Can someone tell me how to change the value of a cell in a table from within
> a function?

> Example-
> If I was to select a value from a Select List and place that value into a
> specific cell every time a new value was selected.

> Thank you for your time....
> Dennis



Wed, 18 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. read or changing the cell height and width of XML based table

2. Dynamically changing a Table when the cells are styled using a class in a css

3. NewBies:Changing Cell table text dinamically

4. Change border thickness on individual table cell ?

5. Changing BG color on a cell in a table onmouseover

6. Changing the contents of a table cell.

7. Change colour of table cell

8. Changing table cell colour on click

9. How to change cell color or font color when data changed

10. databind TDC table - add datafld value to variable string in table

11. Menu will only work in the first cell of a table column

12. Automatic length of cell in a table

 

 
Powered by phpBB® Forum Software