Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table set to invisible!? Pls Help

Status
Not open for further replies.

Forri

Programmer
Oct 29, 2003
479
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
 

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top