On Fri, Feb 18, 2011 at 1:43 PM, Geoff Lane <ge...@gjctech.co.uk> wrote:

> ...if I can manipulate the innerHTML of a tbody element
> then that would do the job.
>
> FWIW, Sarah Giles suggested another mechanism via pm, which is to get
> the server-side script to send XML which is then parsed by client-side
> Javascript to modify the table. That's probably the most flexible
> method, but means a steeper learning curve for me.
>

I'd like to follow up on that suggestion, for the sake of anyone who runs
across the archive of this thread in a web search:

Whenever you have the option, use JSON instead of XML for a task like that.
It's just as easy to generate in most server languages, and it's *much*
simpler to work with on the client. The JSON data becomes native JavaScript
objects and arrays, so you can access it with ordinary JavaScript code
instead of a messy DOM API.

The details would be outside the scope of this list, but there's plenty of
information on JSON out there if you need it.

Anyway, in your case, the multiple <tbody> elements should do the trick.

-Mike
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to