Forum Moderators: open

Message Too Old, No Replies

SSI menu needs to show "active" page

Giving button for the loaded page a unique background

         

fashezee

4:45 pm on Mar 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a navbar that is part of every page via SSI. All buttons have a hover
state, however my client would like the BG of the button that is active to be
different. How can I accomplish this if I'm using SSI to include my navbar?

I'm using CSS to generate the hover state but I'm stuck on how I will change the
BG of the active module?

[edited by: fashezee at 5:03 pm (utc) on Mar. 8, 2003]

gph

5:02 pm on Mar 8, 2003 (gmt 0)

10+ Year Member



With JS:

Add peices of the page names to the array

URL_strs = new Array('mypage','other_page')

for (var i=0;i<URL_strs.length;i++) {
if (location.href.match(URL_strs[i])) {
// switch style sheets or something similiar
}
}

fashezee

5:10 pm on Mar 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have live example of that; sticky me if possible.

gph

5:37 pm on Mar 8, 2003 (gmt 0)

10+ Year Member



Sorry no examples, I'll sticky you with a link to where I originally wrote it.

gph

3:21 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



Did you get it to work?