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 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not working in netscape

    How can I modify this script below to work with Netscape

    <head>
    <script language="javascript">
    <!--
    var Open = ""
    var Closed = ""



    function showhide(what,what2){
    if (what.style.display=='none'){
    what.style.display='';

    }
    else{
    what.style.display='none'

    }
    }
    -->
    </script>
    </head>

    <body>
    <span id="menu1" onClick="showhide(menu1outline)" style="cursor:hand; font-Family:Arial; font-weight:bold">
    Menu
    </span><BR>

    <span id="menu1outline" style="display:'none'">
    <A HREF="2.asp">SubMenu</A>
    </span>
    </body>
    If you don't do it this year, you will be one year older when you do. "Warren Miller"

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This works in Mozilla, so it should work in any Gecko browser (including Netscape 6+) and Internet Explorer 5+

    Code:
    <html>
    <head>
    <script language="javascript">
    <!--
    var Open = ""
    var Closed = ""
    
    function showhide(what)
    {
    	what2=document.getElementById(what);
    
    	if (what2.style.display=='none')
    	{
    		what2.style.display='';
    	}
    	else
    	{
    		what2.style.display='none';
    	}
    }
    //-->
    </script>
    </head>
    
    <body>
    <span id="menu1" onClick="showhide('menu1outline');" style="cursor:hand; font-Family:Arial; font-weight:bold">
    Menu
    </span><BR>
    
    <span id="menu1outline" style="display:none;">
    <A HREF="2.asp">SubMenu</A>
    </span>
    </body>
    </html>

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape 4.7

    I still cannot get it to work in 4.7.

    Oh well!!
    If you don't do it this year, you will be one year older when you do. "Warren Miller"

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Netscape 4.7 can't handle the CSS involved to make it work. That's why. That particular script will work in a 5.0 or newer browser.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree... I might check for netscape 4.x and redirect them to netscape's main download page, or another page that suggests the user download a modern browser to get the best experience. There are plenty of threads on this forum relating to that.

    The time has come to quit supporting antiquated browsers... IMO.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree!! Thanks for the help guys!
    If you don't do it this year, you will be one year older when you do. "Warren Miller"


  •  

    Posting Permissions

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