Link to home
Create AccountLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Hide and Unhide Table

Hello experts, How to hide and unhide Table? my table id is "myTable" I've tried this but it didn't work.

document.getElementById("myTable").display = "none";
Avatar of Big Monty
Big Monty
Flag of United States of America image

How does it not work? Does it throw an error or does nothing happen? Are you able to use jquery?

Please post as many details as possible, it'll help, the experts troubleshoot your problem.

Do you have a link to time page in question? If not, can you post a simplified version of your code?
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of Whing Dela Cruz

ASKER

Hi Monty and Megan that's working but not in div. My div id is "DivH8" its enable to hide only but cannot display back again.  I'm using this to show again.

document.getElementById("DivH8").style.display = "";
Never mind my last issue guys, I've found out the way i place my code was wrong. Thank you, so much, your solution is working.
Try this:
document.getElementById("DivH8").style.display = "block";

Open in new window