views:

103

answers:

2

Admin users can add HTML content to a website via a CMS textbox control.

When this content is displayed to a website visitor, I'd like to identify the presence of a HTML table (added by a Admin user using the CMS) and display an option for visitors to export that table.

I can handle the exporting, but identifying the HTML tables has me stumped. Can anyone provide me with some direction? This website is using ASP.NET 2.0/VB.NET.

+1  A: 

Give them a specific ID and target this id using Javascript acting on the DOM.

http://www.w3schools.com/htmldom/dom_obj_table.asp

Chris Ballance
How do I find the tables to assign them a specific ID?
getElementsByTagNames('table');http://www.quirksmode.org/dom/getElementsByTagNames.html
Chris Ballance
+1  A: 

If you want to do this work client side you can do so with JavaScript using getElementsByTagName('table').

http://www.w3schools.com/HTMLDOM/met_doc_getelementsbytagname.asp

ahsteele