You are here: Re: show/hide <tr> with click « HTML « IT news, forums, messages
Re: show/hide <tr> with click

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]


Удаленная работа для программистов  •  Как заработать на 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

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