#1
  1. No Profile Picture
    phpBB2 setup man
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    East Yorkshire, U.K
    Posts
    41
    Rep Power
    14

    Unhappy Javascript 1.2 netscape problem


    This looks and works excellent in Internet Explorer but does not work in netscape, I have used <SCRIPT LANGUAGE="JavaScript1.2"> in the code and it still does not work :-(
    Anyone any idea why it will not work in netscape :-?
    Here is the code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head><SCRIPT LANGUAGE="JavaScript1.2" SRC="menu.js"></SCRIPT>


    <title>NAV TESTING AREA</title>
    </head>

    <body>

    <SCRIPT LANGUAGE="JavaScript1.2">
    <!--
    var myMenu2 = new Menu();
    myMenu2.addMenuItem("Sprinkler equipment", "location='sprinklers.htm'");
    myMenu2.addMenuItem("Grooved fittings", "location='grooved_fittings.htm'");
    myMenu2.addMenuItem("Valves", "location='valves.htm'");
    myMenu2.addMenuItem("Ancillery Products", "location='ancillary.htm'");
    myMenu2.addMenuItem("Specialist Products", "location='specialist.htm'");
    myMenu2.addMenuItem("Dry/wet riser equipment", "location='dry_wet_riser.htm'");
    myMenu2.addMenuItem("Extinguishers & Accessories", "location='fire_exting.htm'");
    myMenu2.writeMenus();
    //-->
    </SCRIPT>

    <A HREF="javascript:window.showMenu(window.myMenu2);"><FONT FACE="Arial, Helvetica" SIZE=-1>Products</FONT></A>


    </body>
    </html>
    The best things in life are free!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    That's not a menu - it's a wee bit o' Javascript that calls a menu constructor. Pretty hard to tell what's what w/o seeing the rest of it. Link?
  4. #3
  5. No Profile Picture
    phpBB2 setup man
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    East Yorkshire, U.K
    Posts
    41
    Rep Power
    14

    Angry test URL- netscape users please


    URL
    The best things in life are free!
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    You are not the first to have problems with Gary Smith's otherwise excellent menu program. In this case, the menu seems to be functioning fine - there's just a 3-second delay before it gets generated by the program. This appears to be deliberately set to insure that the layer object (Netscape 4) is fully instantiated before going any further. 3 second is an eternity in programming, so I couldn't explain why this was necessary - possibly to allow time to download support images; it definately ruins the effect. You can 'fix' it by finding this line in menu.js with your editor:

    setTimeout('delayWriteMenus()', 3000);

    and changing the delay to something more reasonable, like 100(ms). No guarantees, without knowing why the long delay was deemed necesary in the first place.

    cheers, rf_
    Last edited by mrrichardfeder; December 16th, 2001 at 01:19 AM.
  8. #5
  9. No Profile Picture
    phpBB2 setup man
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    East Yorkshire, U.K
    Posts
    41
    Rep Power
    14

    Angry menu.js gave me a netscape problem


    O.K.
    I changed
    setTimeout('delayWriteMenus()', 3000);
    to
    setTimeout('delayWriteMenus()', 100);
    but it still will not work in netscape 6 :-(
    Any ideas anyone?????
    The best things in life are free!
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    Just for future reference - if you mean Netscape 6, say so; in most developer forums, 'Netscape' implies v.4, particularly when JS 1.2 is involved, since this was introduced with, and is closely associated with, that version. This menu system does not support v.6, which, among other things, doesn't recognize Internet Explorer-specific properties like style.pixelWidth.

    http://www.brothercake.com/dropdown/index.html
    Last edited by mrrichardfeder; December 16th, 2001 at 02:54 PM.

IMN logo majestic logo threadwatch logo seochat tools logo