Hi. I'm a bit new to javascript, so go easy on me. 
I'm trying to form a function to handle menu loading, since I think I'm going to have a lot of menus. Here's the header stuff:
Then you'd call the function with events like onClick="load_menu('different_menu')"
The idea is that the last_menu variable stores the last menu that was accessed, so that the function knows which menu to turn hidden upon loading another, and then updates the last_menu variable with the current menu loaded. Since no events call the function upon loading, I set the variable as 'opening_menu' to give the starting menu.
Except that is giving me an 'object expected' error wherever the function is called. I'm guessing it's just something with my syntax, but I don't know how to work js syntax with cases like this. Another strange thing, when I added this function and an event caller to my page, other completely unrelated events started returning 'object expected' errors as well, even when the events were never triggered. Don't know what that's about, but I'm guessing fixing this would fix that.
I'm trying to form a function to handle menu loading, since I think I'm going to have a lot of menus. Here's the header stuff:
Code:
last_menu = "opening_menu";
function load_menu(menu) {
top.frames[0].last_menu.style.visibility="hidden";
top.frames[0].menu.style.visibility="visible";
last_menu = menu;
}
Then you'd call the function with events like onClick="load_menu('different_menu')"
The idea is that the last_menu variable stores the last menu that was accessed, so that the function knows which menu to turn hidden upon loading another, and then updates the last_menu variable with the current menu loaded. Since no events call the function upon loading, I set the variable as 'opening_menu' to give the starting menu.
Except that is giving me an 'object expected' error wherever the function is called. I'm guessing it's just something with my syntax, but I don't know how to work js syntax with cases like this. Another strange thing, when I added this function and an event caller to my page, other completely unrelated events started returning 'object expected' errors as well, even when the events were never triggered. Don't know what that's about, but I'm guessing fixing this would fix that.