Dynamically Show/Hide table rows?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harry

    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


  • Vjekoslav Begovic

    #2
    Re: Dynamically Show/Hide table rows?

    "Harry" <a@abc.com> wrote
    [color=blue]
    > Is it possible to show/hide individual rows in a table?[/color]

    Of course: You have to locate that rows and change their style property to
    style.display = 'none' or style.display = 'block'.


    Comment

    • DU

      #3
      Re: Dynamically Show/Hide table rows?

      Harry wrote:[color=blue]
      > 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
      >
      >[/color]

      "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.

      Therefore you need to use display:none (and display:table-row) to toggle
      entire rows.

      DU
      --
      Javascript and Browser bugs:

      - Resources, help and tips for Netscape 7.x users and Composer
      - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x


      Comment

      • Vjekoslav Begovic

        #4
        Re: Dynamically Show/Hide table rows?

        "DU" <drunclear@hotR EMOVEmail.com> wrote in message
        news:bj57kq$6vq $1@news.eusc.in ter.net...[color=blue]
        > "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.[/color]
        (...)"[color=blue]
        > 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.[/color]

        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.


        Comment

        Working...