Link to home
Start Free TrialLog in
Avatar of kgittinger
kgittingerFlag for United States of America

asked on

How to hide/suppress a html table is no data is presented?

How to hide/suppress a html table is no data is presented?
Avatar of Brian Pringle
Brian Pringle
Flag of United States of America image

Is this data dynamically generated or is it manually entered?  If it is dynamic, then you could include an IF statement to comment out the table so that it does not appear.
The best method is to use a server side language to generate the required table based on the data from database

To hide/show a table you can use the following:
document.getElementById("table_id").display = "";  //Show the table   
document.getElementById("table_id").display = "none";  //Hide the table 

Open in new window

Avatar of kgittinger

ASKER

The data is dynamically generated.  My if statement returns no data when appropriate, but I cannot seem to hide/suppress the table header/boarders...

I am new to this.  Thank you very much.
One more thing.  Each table is formed via a dynamic query.  The tables are not named.   Do the tables need to be named for the above to work?
ASKER CERTIFIED SOLUTION
Avatar of Brian Pringle
Brian Pringle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial