• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Javascript not working in Netscape 7.01

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I�m new to all this and convinced I�m making a fundamental mistake so hopefully somebody here can�t point it out to me.
I found the following website which explains how to add a nice popup menu to your website.
http://developer.netscape.com/viewsource/smith_menu/smith_menu.html
I stepped through the following steps
To begin, add the following line of code into your web page:
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/openstudio/lib/menu.js"></SCRIPT>
Next, create a menu object by using the JavaScript new operator and the Menu() constructor, as follows:
var myMenu = new Menu();
This statement creates a menu object called myMenu. You can add "menu items" to your newly created menu object with the addMenuItem() method, which is built into the Menu component. For example:
myMenu.addMenuItem("my item");
To continue adding menu items, keep calling addMenuItem(), as shown in the following sample script.
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
var myMenu = new Menu();
myMenu.addMenuItem("my menu item A");
myMenu.addMenuItem("my menu item B");
myMenu.addMenuItem("my menu item C");
myMenu.addMenuItem("my menu item D");
myMenu.writeMenus();
//-->
</SCRIPT>
display myMenu !When I click this link in IE I see my sample menu but not in Netscape
Now this works fine when I use IE 6 SP1 but does nothing but look at me when I use Netscape 7.01.
Can somebody tell me what I�m doing wrong please.
Thanks in advance for any help
Mal
Malrb@hotmail.com
 
Mal RB
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've discovered this error msg in Netscape
Error: container has no properties
Source File: http://localhost:8080/xlinksim/javascript/menu.js
Line: 93
Not sure what it means? Hopefully it'll be of some help.
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javascript is different in older browsers. Gary Smith wrote those menus for old browsers. IE is backwards compatible. NS did the right thing and ditched their old browser completely.
You need a script that works with DOM ECMAScript lang. bindings and then you'll be ok in NS6.2+.
Search on Dynamic Drive and you might find a free one.
reply
    Bookmark Topic Watch Topic
  • New Topic