You are here: Re: Querying a dynamically constructed html table « HTML « IT news, forums, messages
Re: Querying a dynamically constructed html table

Posted by oeb on 11/29/05 17:04

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация