May 11, 2004 #1 Forri Programmer Joined Oct 29, 2003 Messages 479 Location MT Hi all Is it possible to use style.visibility = "hidden" on a table or? if so whats the proper coding for it! Tahnks Ncik
Hi all Is it possible to use style.visibility = "hidden" on a table or? if so whats the proper coding for it! Tahnks Ncik
May 11, 2004 #2 BillyRayPreachersSon Programmer Joined Dec 8, 2003 Messages 17,047 Location GB Yes it is. Assuming your table has an ID of (for example) "myTable", you would use: Code: document.getElementById('myTable').style.visibility = 'hidden'; to hide it, and: Code: document.getElementById('myTable').style.visibility = 'visible'; to show it. You might also consider these alternatives: Code: document.getElementById('myTable').style.display = 'block'; and: Code: document.getElementById('myTable').style.display = 'none'; to show and hide it, respectively, while removing any space the table may take up. Hope this helps, Dan Upvote 0 Downvote
Yes it is. Assuming your table has an ID of (for example) "myTable", you would use: Code: document.getElementById('myTable').style.visibility = 'hidden'; to hide it, and: Code: document.getElementById('myTable').style.visibility = 'visible'; to show it. You might also consider these alternatives: Code: document.getElementById('myTable').style.display = 'block'; and: Code: document.getElementById('myTable').style.display = 'none'; to show and hide it, respectively, while removing any space the table may take up. Hope this helps, Dan