|
Posted by Jukka K. Korpela on 04/07/07 12:28
Scripsit Martin Nadoll:
> i have a table with about 20 rows coming from a mysql database.
> in the database i have text with details for every row.
> i dont want to show all these details, only my other information.
So remove the details when generating an HTML document. It would be
pointlessly risky to make the functionality depend on _both_ CSS _and_
JavaScript being enabled and supported the way you expect.
> so, what i want to do is to make a textlink into every row "show
> details".
That's OK, except that the link texts should be different, so that different
links would have different links, e.g. "Sales Feb 2006". Naturally, they
should be real links, pointing to versions of the page to be generated
server-side as requested.
> i dont want to have server contact after "show details".
So you don't want a robust solution?
> I think it should only be something like show/hide <tr>.
If you wish to continue trying to implement a non-robust approach, you need
to note that CSS properties for manipulating table rows in a collapsing and
expanding manner are poorly supported on major browsers. Odd as it might
sound, the best option is probably to manipulate the DOM (Document Object
Model) tree in JavaScript, adding or removing rows as elements, instead of
just switching visibility.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|