Forum Moderators: open
The script being used for the hide/unhide process has been posted in this thread: [webmasterworld.com...]
Additionally, the page uses a script for the mouseovers. Here's a snippet (I cut out all the image references except one from the main menu and one from one submenu) from it:
<!--
if (document.images) { main01b = new Image();
main01b.src = "Graphics/menu_main01b.gif";
main01a = new Image();
main01a.src = "Graphics/menu_main01a.gif";
qa01b = new Image();
qa01b.src = "Graphics/menu_qa01b.gif";
qa01a = new Image();
qa01a.src = "Graphics/menu_qa01a.gif";
}
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
}
}
}
//-->
And here are two examples of how these scripts are called, one from the main menu and one from a submenu:
<a href="#" onmouseover="changeImages('main01','main01b')" onmouseout="changeImages('main01','main01a')" onclick="ToggleSub('QA');"><img class="Menu" name="main01" src="Graphics/menu_main01a.gif" width="99" height="40" border="0" alt="Q & A" title="Q & A" /></a><a href="FAQ/" onmouseover="changeImages('qa01','qa01b')" onmouseout="changeImages('qa01','qa01a')"><img class="Menu" name="qa01" src="Graphics/menu_qa01a.gif" width="99" height="40" border="0" alt="FAQ" title="FAQ" /></a>
On the page in question, I have the main menu on the left side. Clicking on any item in the main menu unhides the appropriate submenu on the right side. So far, so good (except in Opera). However, there's currently no way for visitors to tell which item out of the main menu they clicked on. And worse, once they click on an item from one of the submenus, they're taken to a new page which starts over with just the main menu displayed.
To improve the navigation, I'd like to do the following:
1) Once a user has clicked on an item from the main menu, I would like it to stay 'selected' (that is, showing the onmouseover version of the graphic) until another item on the main menu is clicked. I would also like to alter the pointer for that item to a standard arrow rather than the hand indicating a link.
2a) Once a user has clicked on an item from the currently active sub menu, which will load the index page of the chosen section, I would like that currently active sub menu to start off unhidden as the new page loads.
2b) As with the selected item from the main menu, I would like the selected item from the currently active sub menu to stay 'selected' (that is, showing the onmouseover version of the graphic) until another item on the main menu or the currently active sub menu is clicked. I would also like to alter the pointer for that item to a standard arrow rather than the hand indicating a link.
I have no idea if any of this is possible, however. 2a I could perhaps see solving with some sort of window.onload function that checks which section of the site a page belongs to (each submenu item corresponds to a folder), to determine if it should start out with a submenu loaded or not? I am not sure how I would go about checking that, however.
to this:
onmouseover=this.firstChild.src="Graphics/menu_main01b.gif"
onmouseout=this.firstChild.src="Graphics/menu_main01a.gif"
i hope this would work well, try this pls, and when ask about other things what you want.
Good luck to you