0

hey buddy i read this code of urs on one of the threads my concern is tht i need to to atore the data form each row in the table into an array..... or a srting.....
could u please help me with this???


<script type="text/javascript">
#
function showContent() {
#

#
var oTBL = document.getElementById('myTable')
#
for (var x = 0; x < oTBL.rows.length; x++) {
#
for (var y = 0; y < oTBL.rows[x].cells.length; y++) {
#
alert(oTBL.rows[x].cells[y].firstChild.data);
#
}
#
}
#
}

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by samaru
0

hey buddy i read this code of urs on one of the threads my concern is tht i need to to atore the data form each row in the table into an array..... or a srting.....
could u please help me with this???


<script type="text/javascript">
#
function showContent() {
#

#
var oTBL = document.getElementById('myTable')
#
for (var x = 0; x < oTBL.rows.length; x++) {
#
for (var y = 0; y < oTBL.rows[x].cells.length; y++) {
#
alert(oTBL.rows[x].cells[y].firstChild.data);
#
}
#
}
#
}

Paste the HTML to your table and we'll be able to better help. Do you want to do it for all the tables on the page, even if the table is used for formatting? Or is it a particular table on the page that has a set id?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.