Re: How to count HTML elements in a given table-row or coloumn?
From: Joe Fawcett (joefawcett_at_hotmail.com)
Date: 02/24/05
- Next message: Josh Gilfillan: "Re: Bulk home folder creation, sharing and set permission"
- Previous message: Torgeir Bakken \(MVP\): "Re: Shortcute for all users desktop"
- In reply to: caglaror: "How to count HTML elements in a given table-row or coloumn?"
- Next in thread: caglaror: "Re: How to count HTML elements in a given table-row or coloumn?"
- Reply: caglaror: "Re: How to count HTML elements in a given table-row or coloumn?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Feb 2005 12:11:02 -0000
"caglaror" <caglaror@gmail.com> wrote in message
news:1109232129.064269.58680@o13g2000cwo.googlegroups.com...
> How to count HTML elements in a given table-row or coloumn?
> And how to handle their properties?
>
>
> Note: I have to catch the value of an input element in a given row
> (html element). But i can'nt control the id and name properties.
> Thanks
>
If you know which cell, e.g. the third cell then, assuming your table has an
id of "tblData" and you're looking at the second row:
var oTable = document.getElementById("tblData");
var oCell = oTable.rows[1].cells[2];
var oInput = oCell.getElementsByTagName("input")[0];
alert(oInput.value);
This assumes that there are no other input elements in the cell. If this
isn't good enough post a sample of your table structure and specify how you
know which row to inspect.
-- Joe (MVP)
- Next message: Josh Gilfillan: "Re: Bulk home folder creation, sharing and set permission"
- Previous message: Torgeir Bakken \(MVP\): "Re: Shortcute for all users desktop"
- In reply to: caglaror: "How to count HTML elements in a given table-row or coloumn?"
- Next in thread: caglaror: "Re: How to count HTML elements in a given table-row or coloumn?"
- Reply: caglaror: "Re: How to count HTML elements in a given table-row or coloumn?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|