|
-
Aug 14th, 2001, 03:35 PM
#1
Thread Starter
Lively Member
Hiding/Showing parts of table
Does anybody know how to show & hide a <td> or <tr> or is it done some other way??
I want to be able to hide information in a lower part of a table then have an image/hyperlink that will hide or show it.
d'you catch my drift??
thanks in advance
-
Aug 15th, 2001, 07:25 AM
#2
Frenzied Member
you can try this, don't know if it work!!
<table>
<tr>
<td id="test">dsfdsfdf</td>
</tr>
<table>
<input type=button onClick="document.all['test'].style.visibility='hidden';" value="hide cell">
let me know if it works!!
-
Aug 15th, 2001, 07:37 AM
#3
Thread Starter
Lively Member
It sort 'of works but the <td> that your hiding doesn't shrink.
The idea is to have a table with 10+ rows, rows 2 - 5 are hidden, so when I click on a Image/Hyperlink rows 2 - 5 will toggle their visibility and pull row 6 underneath row 1
Similar to the functionality in a treeview control
Does that make any sense???
-
Aug 15th, 2001, 07:41 AM
#4
Frenzied Member
well you will have to do it will layers i'm afraid,
!!
-
Aug 15th, 2001, 11:18 AM
#5
Fanatic Member
i don't think you do, check this out:
Code:
<html>
<head>
<title>Test</title>
<head>
<body>
<table border="1">
<tr>
<td id="test">dsfdsfdf</td>
<td id="test2">asdfjkl;</td>
</tr>
<tr id="test3">
<td>dsfdsfdf(row2)</td>
<td>asdfjkl;(row2)</td>
</tr>
<table>
<input type=button onClick="document.all['test3'].style.display='block';" value="show cell">
<input type=button onClick="document.all['test3'].style.display='none';" value="hide cell">
</body>
</html>
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 15th, 2001, 11:31 AM
#6
Thread Starter
Lively Member
Thanks gwdash Spot on!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|