#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    3
    Rep Power
    0

    Unhappy javascript dropdown in netscape


    Hi there.

    I am quite new in web development.
    I tried to develop drop down menu in Javascript.
    It works perfectly well in IE.
    But when I run in Netscape, it does not run at all.
    Does anybody have this experience before?
    I attached the file here:

    And the Menu.CSS

    .submenu{
    position:absolute;
    width:17%;
    height:100px;
    z-index:4;
    left: -500;
    top: 22px;
    visibility: hidden";
    bgcolor:#CCCCCC;
    }

    a:link { color: #CCCCCC; text-decoration: none}
    a:visited { color: #CCCCCC; text-decoration: none }
    a:active { color: #000000; text-decoration: none}
    a:hover { color: #000000; text-decoration: none}


    ==================================

    or is there a way to make sure it runs?

    Thanks..

    han
    Attached Files
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Europe
    Posts
    2
    Rep Power
    0

    Lightbulb


    this is a more easy menu and work both in IE and NN (and mozilla) and opera

    <script language="JavaScript">
    function show(obj){
    document.getElementById(obj).style.visibility="visible";
    }
    function hide(obj){
    document.getElementById(obj).style.visibility = "hidden";
    }
    </script>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <div id="menu1" style="position:absolute; left:0px; top:80px; width:130px; height:180px; z-index:1;background-color: #FF0000; border: 1px solid #000000;visibility:hidden" onMouseOver="show('menu1')" onMouseOut="hide('menu1')" onMouseDown="hide('menu1')">contingut</div>
    <div id="menu2" style="position:absolute; left:131px; top:80px; width:130px; height:180px; z-index:1;background-color: #FF0000; border: 1px solid #000000;visibility:hidden" onMouseOver="show('menu2')" onMouseOut="hide('menu2')" onMouseDown="hide('menu2')">contingut</div>
    <div id="menu3" style="position:absolute; left:262px; top:80px; width:130px; height:180px; z-index:1;background-color: #FF0000; border: 1px solid #000000;visibility:hidden" onMouseOver="show('menu3')" onMouseOut="hide('menu3')" onMouseDown="hide('menu3')">contingut</div>
    <div id="menu4" style="position:absolute; left:393px; top:80px; width:130px; height:180px; z-index:1;background-color: #FF0000; border: 1px solid #000000;visibility:hidden" onMouseOver="show('menu4')" onMouseOut="hide('menu4')" onMouseDown="hide('menu4')">contingut</div>
    <div id="menu5" style="position:absolute; left:524px; top:80px; width:130px; height:180px; z-index:1; background-color: #FF0000; border: 1px solid #000000;visibility:hidden" onMouseOver="show('menu5')" onMouseOut="hide('menu5')" onMouseDown="hide('menu5')">contingut</div>
    <table width="650" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="50">50px</td>
    </tr>
    <tr>
    <td height="30"><table width="650" height="30" border="0" cellpadding="0" cellspacing="0">
    <tr align="center">
    <td onMouseOver="show('menu1')" onMouseOut="hide('menu1')" onMouseDown="hide('menu1')">menu 1</td>
    <td onMouseOver="show('menu2')" onMouseOut="hide('menu2')" onMouseDown="hide('menu2')">menu 2</td>
    <td onMouseOver="show('menu3')" onMouseOut="hide('menu3')" onMouseDown="hide('menu3')">menu 3</td>
    <td onMouseOver="show('menu4')" onMouseOut="hide('menu4')" onMouseDown="hide('menu4')">menu 4</td>
    <td onMouseOver="show('menu5')" onMouseOut="hide('menu5')" onMouseDown="hide('menu5')">menu 5</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td height="100">100px</td>
    </tr>
    </table>

IMN logo majestic logo threadwatch logo seochat tools logo