Click to See Complete Forum and Search --> : Menu error


wdale2000
06-26-2003, 10:06 PM
I have whipped this cascading menu into what I need it to do on my site. When I was editing it on a blank HTML Document(w/html, head, and body tags), it worked like a charm in IE, but, when I transfer the script to my (offline) page, the table, where the script displays, shows but the title sections of the menu do not. It is a mouseover menu, but nothing happens there, and, when you click on the table area, it continues to get an error;

'menu[...].0.ref' is null or not an object...

This is the section of code that errors, menu[count][0]..

}
function hideAllBut(menuNum) {
var keepMenus = getTree(menuNum, 1);
for (count = 0; count < menu.length; count++)
if (!keepMenus[count])
menu[count][0].ref.visibility = 'hidden';
changeCol(litNow, false);
}

Please advise, I'd really appreciate the input.
Thank you.
Dale.

Jona
06-26-2003, 10:22 PM
Do you possibly have a link? Or is it just not working when you take the page offline?

[Jona]

wdale2000
06-26-2003, 10:27 PM
Actually, it never has been on-line. I'm working with it on my HTML Editor, only.

I re-worked it in my editor, on a blank HTML page. When I put the code onto one of my soon-to-be on-line pages, it errors. This soon-to-be on-line page has other scripts working on it.

Jona
06-26-2003, 10:29 PM
Perhaps your online pages' Javascript conflicts with your offline pages' Javascript.

[Jona]

wdale2000
06-26-2003, 10:41 PM
Ok....Here's the link...maybe it will tell you something...I hope. The table is the blue bar, just below the logo, title, and flag.

http://www.dmkonline.net/page2000.html

Thanks, Jona.

Dale.

Jona
06-27-2003, 09:58 AM
Generally this error is caused because one of your loops is going over the maximum limit, where the maximum limit is the length of the array. So, for example, if menu[count][0].ref does not exist, it means that probably count is a number over the limit of the menu array.

[Jona]