3 replies [Last post]
vyper78
Offline
newbie
Last seen: 15 years 34 weeks ago
Timezone: GMT+11
Joined: 2004-11-04
Posts: 2
Points: 0

After downloading the js for the multi-level menu, an error appears when the page is loaded. The error appears at the following point:

if (document.all && document.getElementById(nav).currentStyle) {

Error says an object is required.
Any thoughts

Cheers
V.

Tags:
Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 days 5 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Javascript error

Hi vyper78,
Looks like the id passed in as nav is incorrect.

Have a look at this section

Quote:
window.onload= function(){
/* pass the function the id of the top level UL */
/* remove one, when only using one menu */
activateMenu('nav');
activateMenu('vertnav');
}
which passes the id of the top UL to the function.
On my example page there are two menus one with the id of nav and another with the id of vertnav.
Make sure you have removed the one you don't need if you have only one menu on the page.

Hope that helps

vyper78
Offline
newbie
Last seen: 15 years 34 weeks ago
Timezone: GMT+11
Joined: 2004-11-04
Posts: 2
Points: 0

Javascript error

Cheers, worked a charm ...
Apologies for the oversight .. Laughing out loud

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 days 5 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Javascript error

Glad to be of help,
I moved this to off Topic as it is a JavaScript question.