kgittinger
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?
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:
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
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.
I am new to this. Thank you very much.
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.