Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    406
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expandable list not working in NN

    Here is a code for expandable list. This is not working in NN 4.7.

    Is there a way I can modify so it will work in NN 4.7?

    <head>
    <style type="text/css">
    <!--
    .open {
    display: block;
    }
    .closed {
    display: none;
    }
    li {
    list-style-type: none;
    padding-top: .2em;
    padding-bottom: .2em;
    font-size: 18px;
    }
    -->
    </style>

    <script type="text/javascript">
    <!--
    function toggle(id){
    ul = "ul_" + id;
    img = "img_" + id;
    ulElement = document.getElementById(ul);
    imgElement = document.getElementById(img);
    if (ulElement){
    if (ulElement.className == 'closed'){
    ulElement.className = "open";
    imgElement.src = "images/opened.gif";
    }else{
    ulElement.className = "closed";
    imgElement.src = "images/closed.gif";
    }
    }
    }
    //-->
    </script>
    </head>

    <body>

    <table>
    <tr><td valign="top">




    <ul class="open">
    <li id="item1"><a href="#" onclick="toggle('item1');"><img src="images/closed.gif" alt="" id="img_item1" border="0"></a> <a CLASS="LgBLueLink" href="#">Introduction: Dimensional Analysis: Similitude</a>
    <ul id="ul_item1" class="closed">
    <li id="item1_1"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_2"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_3"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    <li id="item2"><a href="#" onclick="toggle('item2');"><img src="images/closed.gif" alt="" id="img_item2" border="0"></a> <a CLASS="LgBLueLink" href="#">Introduction: Dimensional Analysis: Similitude</a>
    <ul id="ul_item2" class="closed">
    <li id="item1_41"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_42"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_43"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    <li id="item3"><a href="#" onclick="toggle('item3');"><img src="images/closed.gif" alt="" id="img_item3" border="0"></a> <a CLASS="LgBLueLink" href="#">Momentum Equation - The Newton's Laws</a>
    <ul id="ul_item3" class="closed">
    <li id="item1_41"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_42"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_43"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    </ul>

    </li>
    </ul>
    </li>
    <li id="item1_5"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Second Law of Thermodynamics</a>
    <ul id="ul_item1" class="closed">
    <li id="item1_1"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_2"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_3"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    <li id="item2"><a href="#" onclick="toggle('item2');"><img src="images/closed.gif" alt="" id="img_item2" border="0"></a> <a CLASS="LgBLueLink" href="#">Introduction: Dimensional Analysis: Similitude</a>
    <ul id="ul_item2" class="closed">
    <li id="item1_41"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_42"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_43"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    <li id="item3"><a href="#" onclick="toggle('item3');"><img src="images/closed.gif" alt="" id="img_item3" border="0"></a> <a CLASS="LgBLueLink" href="#">Momentum Equation - The Newton's Laws</a>
    <ul id="ul_item3" class="closed">
    <li id="item1_41"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">Introduction</a></li>
    <li id="item1_42"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The Equation of Contiuity</a></li>
    <li id="item1_43"><img src="images/wh.gif"> <a CLASS="LgBlueLink" href="#">The First Law of Thermodynamics</a></li>
    </ul>

    </li>
    </ul>




    </li>
    <li id="item1_6"><a CLASS="LgBlueLink" href="#">The Third Law of Thermodynamics</a></li>
    <li id="item1_7"><a CLASS="LgBlueLink" href="#">The Momentum Equation - Newtons Laws</a></li>
    </ul>
    </li>

    </ul>




    </td></tr>
    </table>
    </body>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, you cannot fix it for Netscape 4.x because Netscape 4.x predates so many of today's standards and lacks true dynamic capabilities. Treat Netscape 4.x like you would Netscape 3.x or IE 3.x.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    406
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok thanks. Does any one know of a javascript or dhtml for this kind of menu (collapsible expandable or nested menu) which will work in NN 4.7 also?
    Last edited by chelvis; 01-27-2004 at 09:42 PM.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's not possible without tag-soup coding written last century which would invalidate your page in every other browser, and almost certainly not work in modern mozilla browsers, Safari or Opera.

    But if you really want that ... Dan Steinman's original DynAPI might have something.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Regular Coder
    Join Date
    Mar 2003
    Posts
    241
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Before you decide if you really want to code for NS 4.x I urge you to read these articles @ a list apart:
    To Hell With Bad Browsers
    Why Don’t You Code for Netscape?

    It convinced me not to code for NS 4.x anymore [or for any specific browser for that matter], the benefits of coding according to the standards are far superior to coding for individual browsers !

    Not sure if this helps you or not, but the articles helped me convincing my boss that the NS 4.x and IE <5 are bad bad bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •