473,663 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically Show/Hide table rows?

I want to provide a drill down facility for the users - the plan is to
intially display a table with summary rows containing results of previous
selected search criteria.

In each summary row you have a button to drill down i.e which displays X
number of rows with results that make up the summary row value. When
"drilled down" also provide a button to "collapse" the detail rows!

Is it possible to show/hide individual rows in a table? - do I have to have
each row as a table & a DIV statement around it?

I know it must be possible buts whats the best way?

thanks

harry
Jul 20 '05 #1
3 27137
"Harry" <a@abc.com> wrote
Is it possible to show/hide individual rows in a table?


Of course: You have to locate that rows and change their style property to
style.display = 'none' or style.display = 'block'.
Jul 20 '05 #2
DU
Harry wrote:
I want to provide a drill down facility for the users - the plan is to
intially display a table with summary rows containing results of previous
selected search criteria.

In each summary row you have a button to drill down i.e which displays X
number of rows with results that make up the summary row value. When
"drilled down" also provide a button to "collapse" the detail rows!

Is it possible to show/hide individual rows in a table? - do I have to have
each row as a table & a DIV statement around it?

I know it must be possible buts whats the best way?

thanks

harry


"The 'visibility' property takes the value 'collapse' for row, row
group, column, and column group elements. This value causes the entire
row or column to be removed from the display, and the space normally
taken up by the row or column to be made available for other content. (...)"
Support for visibility:coll apse is not good in current browsers.
http://www.w3.org/TR/CSS2/tables.html#dynamic-effects
Therefore you need to use display:none (and display:table-row) to toggle
entire rows.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #3
"DU" <dr*******@hotR EMOVEmail.com> wrote in message
news:bj******** **@news.eusc.in ter.net...
"The 'visibility' property takes the value 'collapse' for row, row
group, column, and column group elements. This value causes the entire
row or column to be removed from the display, and the space normally
taken up by the row or column to be made available for other content. (...)" Support for visibility:coll apse is not good in current browsers.
http://www.w3.org/TR/CSS2/tables.html#dynamic-effects
Therefore you need to use display:none (and display:table-row) to toggle
entire rows.


Which is good for Mozilla, but IE6 says 'Could not get the display property.
Invalid argument'.
display:block works good in IE6, but not in Mozilla.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4946
by: KathyB | last post by:
Hi, I'm trying to get the following script to work, but I'm getting an error saying "rowID is undefined". function showhide(rowId) { var showRow = "Edit_" + rowID var hideRow = "View_" + rowID document.getElementById(showRow).style.display ="block"; document.getElementById(hideRow).style.display = "none"; }
2
8221
by: Mark | last post by:
Hi, I need to be able to have five different links and when when someone clicks to show row 2, row 1 automatically hides. Right now all i can figure out is a link that will show but then you have to click the same link to hide. I want to be able to turn off a row when another row is clicked on to show? Can someone help?
5
2328
by: Marek Mänd | last post by:
Please explain to a experienced fool like me, how to hide table rows correctly at this case. http://marekmand.kuubik.ee/iebug_canthide_table_rows_properly.htm Click on the header "label" and see how IE6 SP1 draws the borders wrongly. How it can be patched? Does that mean, that with the collapsed border table model one cannot set the display of rows successfully with no side effects in IE6 SP1?
9
33437
by: Wang, Jay | last post by:
I try to group several rows in a table into a div and show/hide them by click on a button somewhere with a javascript link. When clicked, the link will toggle the style of the div section's style between BLOCK and NONE. This technique works on normal text fine, but it doesn't work on part of the table, is there a solution that I can achieve the goal of turning on/off several rows all together? Thanks.
3
16931
by: AR | last post by:
Hi, How can I hide table rows? ... tried with the following example: FireFox works... How to do the simillar in IE6? <html> <head> <script language="javascript"> function hide_row() { var v = document.getElementsByName("trBook"); v.style.display = 'none';
2
7007
by: Mateo | last post by:
Hi! I have a litle JS problem.... I'm trying to make show/hide table JS function, but my show/hide table function works only on IE.... It works in mozilla partially. Actually,every time when I contract table the empty field is left. You can see example in left side menu on www.kijevo.hr when you click on plus or minus. If you
12
15659
by: Jerad Rose | last post by:
I searched for a while trying to find the answer to this, but to no avail. I am trying to find the best way (or any way) to dynamically show and hide groups of TR's. For example, I have a section of about 6 table rows that all need to be hidden if a certain condition is met. But I don't want to hide the whole table. And, I don't want to split up the table because the columns need to remain intact. I thought about using runat=server...
1
1894
by: shankwheat | last post by:
I'm creating a dynamic table with asp and I would like to add a "Show All" and "Collapse All" feature to show/hide certain rows within the table. This code works well for showing/hiding one row at a time but I'm not sure how to all the "Show All/Hide All" feature. Thanks. function sh_RowShowHide(sh_RowID) { var currRow = document.getElementById(sh_RowID); if (currRow.style.display=="none") { currRow.style.display="";...
1
7403
by: jbreaker | last post by:
Hi - I have a table with about 30 rows, which contain a checkbox and a bit of text each. What I'm trying to find a way to do is to have 2 buttons at the bottom of the page - HIDE & SHOW. When the HIDE button is clicked, I need to hide all the table rows which contain UNCHECKED textboxes. When the SHOW button is clicked, I want to restore the visibility of all the rows. I need to do this in JavaScript (which is what I'm having trouble with)...
0
8436
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8548
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4182
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.