By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

I am using display:none with using Table

P: 2
I am using display:none with using Table. When show the onClick using javascript. Then it will show, again i will hide, content only hidden, but that table doesn't hide.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2.       function tableHide() {
  3.  
  4.  var tableID = document.getElementById("TableID");
  5. if (tableID.style.display=="none") {
  6.    tableID.style.display="block";
  7. }
  8. else {
  9.    tableID.style.display="none" ;
  10. }
  11. }
  12. </script>
  13.  
  14.  
  15.  
  16. <table id="TableID" style="display:none">
  17. .....
  18. ....
  19. ...
  20. </table>
Mar 17 '08 #1
Share this Question
Share on Google+
1 Reply


hsriat
Expert 100+
P: 1,654
Expand|Select|Wrap|Line Numbers
  1. function tableHide() {
  2.     var tableID = document.getElementById("TableID");
  3.     tableID.style.display = tableID.style.display=="none" ? "" : "none";
  4. }
May 23 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.