Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Pull data from the existing HTML table
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/10/2008 at 07:00 PM Reply With Quote
Pull data from the existing HTML table


Code:

<script>
var e_table = document.getElementById('myTable'), // <- ID of your table here
e_row, TABLE_CONTENT = [];
// hide the static HTML table
e_table.style.display = 'none';
// skip first row (starting from 1 instead of 0)
for (var r = 1; r < e_table.rows.length; r++) {
var a_row = [], re_tags = /<[^>]*>/g;
e_row = e_table.rows[r];
// skip first column
for (var c = 1; c < e_row.cells.length; c++) {
a_row[a_row.length] = (c == 3
// remove HTML for fourth row
? String(e_row.cells[c].innerHTML).replace(re_tags, '')
: e_row.cells[c].innerHTML
);
}
TABLE_CONTENT[TABLE_CONTENT.length] = a_row;
}
new TTable(TABLE_CAPT, TABLE_CONTENT, TABLE_LOOK);

</script>



TABLE_CAPT must be configured to match the table's columns
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004