473,385 Members | 2,069 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,385 software developers and data experts.

getting cell contents

Is there a way to get the cell content of a table?
For example if I have the below table

Parent | Child
Mark | Nick
Julia | Maria

Is there a way to get the contents for example below the table to have a sentence of Mark is the parent of Nick
Aug 29 '06 #1
2 1666
iam_clint
1,208 Expert 1GB
uhm i believe you can set an id for each TD and then use javascript to get the innerHTML of that td...

document.getElementById('parent1').innerHTML
document.getElementById('child1').innerHTML
Aug 29 '06 #2
You can deffinately get the contents using innerHTML with javascript if the cell has an id, however if the cell was generated and inserted dynamically, , and does not have an id you won't be able to get the contents using innerHTML. A solution for getting the contents using row and cell indices, which you can loop through, would be ideal if anyone out there has one.
Dec 8 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: mefloyd | last post by:
Hello, I'd like to outline the current cell in an MSFlexGrid control with a certain color and line thickness. I thought of putting a shape control on the form and positioning it over the cell,...
2
by: Joe Smith | last post by:
Hi, I'm using the code below to change the contents of a cell table in IE. The problem is that the cell size won't adjust to the size of the content, as its positions have been declared 'absolute'....
6
by: Anon | last post by:
I have a table with a cell. The cell's ID is created using a unique name that is held in m_UniqueCellName and the cell is created like so... document.write( "<TD ID="' + m_UniqueCellName +...
2
by: Michael Satterwhite | last post by:
I need to be able to dynamically change the contents of a table cell (e.g. the text between <td> and </td>. I've been searching the web, but haven't found the solution to this one. I know the...
3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
7
by: Arne Beruldsen | last post by:
in vbnet2005 I have a datagridview. When the user clicks on a row...I would like the contents of certain cells to populate a textbox. To do this...i need to be able to refer to the row and...
1
by: harini | last post by:
hi, i am working on asp.net with c#. i have a datagrid populated to a datatable...i havent used a DB...i have created a datatable and filled values in it thru code... now i need to get the...
0
by: S_K | last post by:
Hi, I have an editible GridView that I can read the contents of each cell of the edit row as follows: int iEditIndex = GridView2.EditIndex; string strName = GridView2.Rows.Cells.Text; This...
3
by: somsub | last post by:
Hi, I m facing a problem to add an array as a comment to a MS excel cell using Spreadsheet :: WriteExcel . I m using the below code use Spreadsheet::WriteExcel; $workbook =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.