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

hide menu using jscript

P: 2
Im trying to hide a menu column using jscript. Its works as required in firefox but ie.. a big no no.

Please see the code below....

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE></TITLE>
  5. <script language="JavaScript" type="text/javascript">
  6.  
  7. function toggleMenu(e){
  8.      if(document.getElementById(e).style.display == "")
  9.          document.getElementById(e).style.display = "none";
  10.     else
  11.        document.getElementById(e).style.display = "";  
  12.   }
  13.  
  14. </script>
  15. </HEAD>
  16. <BODY style="margin:0px">
  17.  
  18. <table cellpadding="0" cellspacing="0" id="menuxcdgfTable" width="100%" height="100%" border="1">
  19.   <tr>
  20.     <td colspan="3" height="100px" style="background-color:fuchsia">header</td>
  21.   </tr>
  22.    <tr>
  23.      <td width="200" id="Menu" style="background-color:aqua;">menu area</td>
  24.      <td width="5" style="background-color:lime;cursor:pointer;" onclick="toggleMenu('Menu')">s</td>
  25.      <td>main content window</td>
  26.    </tr>
  27. </table>
  28. </BODY>
  29. </HTML>
Feb 7 '08 #1
Share this Question
Share on Google+
2 Replies


harshmaul
Expert 100+
P: 490
Hi,
this seems to be working for me. which version IE browser have you got?
Feb 8 '08 #2

Death Slaught
100+
P: 1,137
Please do not double post, your question has already been answered back in the JavaScript forum.

Please read the posting guidelines, there's a link below.

^_^ Thanks, Death
Feb 8 '08 #3

Post your reply

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