T
Tim Streater
Not sure is this is quite the right NG, but anyway:
I have rows in a table which I want to have represent nested data, which
I want to show and hide. I can hide a row easily enough by doing:
object.style.display = 'none'; and
object.style.display = '';
but for nested data it gets a lot more complex (imagine how with
Explorer you click on the little plus and minus to expose or hide nested
sections). I did look at using <tbody> but you can't nest these - every
new <tbody> closes the previous one, even if you leave off the </tbody>.
I will be generating the rows from a database with PHP, so I 'know' the
nesting as I generate the table, and I could generate custom objects to
model it, but an HTML construct with the right characteristics would be
preferable. Am I missing anything obvious?
Comments welcome.
Thanks,
-- tim
I have rows in a table which I want to have represent nested data, which
I want to show and hide. I can hide a row easily enough by doing:
object.style.display = 'none'; and
object.style.display = '';
but for nested data it gets a lot more complex (imagine how with
Explorer you click on the little plus and minus to expose or hide nested
sections). I did look at using <tbody> but you can't nest these - every
new <tbody> closes the previous one, even if you leave off the </tbody>.
I will be generating the rows from a database with PHP, so I 'know' the
nesting as I generate the table, and I could generate custom objects to
model it, but an HTML construct with the right characteristics would be
preferable. Am I missing anything obvious?
Comments welcome.
Thanks,
-- tim