View Full Version : Back and Forwards navigation outside the menu

10-30-2006, 04:00 AM
1) Script Title: Switch Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm

3) Demo URL: http://www.1-mic.co.uk/demo.php

4) Problem: Back and Forwards navigation outside the menu (content area links)


Firstly, A big big thanks for this script. It really is awesome.

I'm novice at this and have come across a problem with my implementation.

Basically, i wanted to expand the related section of the menu for basic links clicked elsewhere on the page.
For example, the main menu has a member section(7 links). Lets say somewhere else on the page, content area, also has member links.

I worked out that if i add onclick="SwitchMenu('sub#')" to the href for content area links, it will expand that relevant section in the menu when the page jumps. (doesn't work in Opera)

My problem however, is the mouse back button and the browser back/forward buttons. If i use these to navigate away from a page, which i navigated to through a content area link using onclick="SwitchMenu('sub#')", the menu sections stay as they were on the previous page.

1. Homepage
2. Clicks content area link for members section
3. Page opens and the members section in the menu also expands
4. Clicks back button to homepage, members section in the menu remains expanded??????

If you click any link in the "getting started" box on the demo page, and then click back with the mouse etc, you'll see what i mean.

Any advice would be great.