Re: Querying a dynamically constructed html table
- From: oeb <what.will.i.do.with.a.gig@xxxxxxxxx>
- Date: Tue, 29 Nov 2005 15:04:53 +0000
ukrbend wrote:
Is there a way to do a client side query (perhaps using a scripting language) that allows you to query info about an html table that was constructed on the server side via ASP? So for instance how many rows and columns the table has.
Thanks for any help.
If you give the table a specific ID and onload count its child nodes (<tr> tags) using DOM, that should return the number of rows it has. and by counting the children of one of its child tags, you get the number of cols (the number of <td> in the first <tr>)
Javascript would be very suitable for this, but I don't understand why you need to validate data like this on the client side. Can't you just do it on the server side where there is less to go wrong?
oeb .
- References:
- Querying a dynamically constructed html table
- From: ukrbend
- Querying a dynamically constructed html table
- Prev by Date: Querying a dynamically constructed html table
- Next by Date: Re: Trouble embedding ActiveX object in HTML using object tag
- Previous by thread: Querying a dynamically constructed html table
- Next by thread: Re: Querying a dynamically constructed html table
- Index(es):
Relevant Pages
|