Forum Moderators: open

Message Too Old, No Replies

Light up buttons to show where I am

Dual - menu in Ajax c/w buttons above

         

sjrw

2:11 pm on Aug 3, 2008 (gmt 0)

10+ Year Member



____________________________
¦
¦ Buttons Here 1 2 3....
¦__________________________
¦ . . . . . ¦
¦ . . . . . ¦
¦Sub . . .¦Content
¦Menus . ¦from
¦go . . . ¦Sub Menu
¦Here . .¦goes
¦ . . . . .¦Here
¦ . . . . .¦
¦

Here's the setup. I have a bar acros the top with buttons. Some put content directly into the right div(content e.g. links / home). Some change the menu in the left div(sub menus).
The sub menus in the left div change the content in the right div.
The last item on the left div sub menu is always "Main Menu" (the starting menu, which simply goes back to the main menu in the left div.)

It sounds complicated but it's not really.

I want to know if it's possible to make buttons for the top bar which will light up to show where in the site you are at the moment.

I cannot think how it can be done, or am I missing something simple?

Fotiman

4:49 pm on Aug 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Presumably, each button links to its own page, correct? Or is this using frames and/or AJAX to populate the bottom two areas? If the former, then give each page a unique id and assign it to the body:

<body id="mainmenu">

<body id="foo">

<body id="bar">

Then, simply target the button you want highlighted ni your CSS:


#mainmenu input#mainmenubutton,
#foo input#foobutton,
#bar input#barbutton {
/* Your highlight styles go here */
color: red;
}

If you are using JavaScript to dynamically change the content of the bottom sections without actually going to a new page, then this method could be modified so that when you clicked on a button it also set a classname on the body (instead of an id), and then you would just modify the style rules to use .mainmenu instead of #mainmenu (etc.)

lexipixel

5:20 pm on Aug 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



or am I missing something simple

Maybe you are.

Why not just implement "breadcrumbs" ?

e.g.-

You are here: Home > Forums Index > Browser Side World > JavaScript and AJAX

content...content...content...content...
content...content...content...content...
content...content...content...content...
content...content...content...content...