Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6556609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:58:00+00:00 2026-05-25T12:58:00+00:00

I have a CGI script that generates an HTML table with an arbitrarily large

  • 0

I have a CGI script that generates an HTML table with an arbitrarily large number of rows, in an arbitrary order.

Each row is a member of one or more subsets, and there are 26 subsets total (26 representing a small relative constant).

While I am generating the page, I know which subsets each row belongs to, and can tag them in any way necessary.

I then wish to provide 26 buttons on the page with which the user can press any one of them to filter the table to that subset of rows. The order in which the rows appear is significant relative to each other, but no information is lost by hiding rows that do not belong to the subset the user desires to view.

The first priority is that the computations for the filtering are done client-side, not server-side, and the client does not re-request the page, as it is significant in size and the server is very busy doing other things. (read as: Javascript, right?) The page is not requested very often, but many filter operations are normally requested for each page request.

The second priority is that the client-side filtering is done as efficiently as possible. The dataset is very large.

The third priority is the widest possible browser interoperability.

I am not a web programmer by any stretch, if you can’t already tell.

I originally tried to do this by representing each tag as a CSS class, assigning multiple classes to each row as necessary, and then using JavaScript to modify the CSS definitions, but it started to give me a headache. If this works, I can’t quite figure it out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:58:01+00:00Added an answer on May 25, 2026 at 12:58 pm

    CSS way, check it out – JSFiddle
    And maybe someone could do something about ie6-7, if that matters.

    <!DOCTYPE html>
    <html>
        <body>
            <style>
                #table tr { display: none }
                #table.all tr { display: table-row }
                #table.bar tr.bar { display: table-row }
                #table.foo tr.foo { display: table-row }
            </style>
            <input type="button" value="Foo" onclick="filter('foo')">
            <input type="button" value="Bar" onclick="filter('bar')">
            <table id="table" class="all">
                <tr class="foo"><td>1</td></tr>
                <tr class="bar"><td>2</td></tr>
                <tr class="foo bar"><td>3</td></tr>
            </table>
            <script type="text/javascript">
                var table = document.getElementById('table')
                function filter (cat) {
                    table.className = cat
                }
            </script>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a CGI script that generates a file on the server and then
I have a script that appends some rows to a table. One of the
My situation is that I have a POST cgi script that generates and returns
I have written a CGI script that creates an image dynamically using GET data.
I have a PHP script that runs as a CGI program and the HTTP
I have a CGI script that does a lot things. I'm trying to keep
I have a bash script that is being used in a CGI. The CGI
I have a web page that sends a request to a cgi script that
I have a CGI script pulling bibliography data from a BibTeX file, building HTML
I'm running Lighttpd on Cygwin. I have a Lua CGI script that calls a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.