hide menu using jscript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunsoffun
    New Member
    • Feb 2008
    • 2

    hide menu using jscript

    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....

    [CODE=html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <script language="JavaS cript" type="text/javascript">

    function toggleMenu(e){
    if(document.get ElementById(e). style.display == "")
    document.getEle mentById(e).sty le.display = "none";
    else
    document.getEle mentById(e).sty le.display = "";
    }

    </script>
    </HEAD>
    <BODY style="margin:0 px">

    <table cellpadding="0" cellspacing="0" id="menuxcdgfTa ble" width="100%" height="100%" border="1">
    <tr>
    <td colspan="3" height="100px" style="backgrou nd-color:fuchsia"> header</td>
    </tr>
    <tr>
    <td width="200" id="Menu" style="backgrou nd-color:aqua;">me nu area</td>
    <td width="5" style="backgrou nd-color:lime;curs or:pointer;" onclick="toggle Menu('Menu')">s </td>
    <td>main content window</td>
    </tr>
    </table>
    </BODY>
    </HTML>[/CODE]
    Last edited by eWish; Feb 8 '08, 04:06 AM. Reason: Please use [CODE][/CODE] tags
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,
    this seems to be working for me. which version IE browser have you got?

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #3
      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

      Comment

      Working...