Click to See Complete Forum and Search --> : Active link / multiple frames - HELP!!


mattijs72
03-27-2003, 04:30 AM
Hope this is possible at all.

I created a website using 3 frames.
In the top frame there is a main menu. In the left frame there is a submenu. In the mainframe: content.

When you click a link in the top frame it will become the active link. And so you'll get another color for that link.
( i defined that in a css)

BUT when I click on a link in another frame, the link in the topframe loses it's active state, and will change color. I do not want this! Because I want visitors to keep track of where they are. I only want the active link in the top-frame to change when you click another link in THAT frame. Not when a link in another frame is clicked.

Can this be done with javascript?
I've searched for hours but did not find a solution

Thanks in advance!

gil davis
03-27-2003, 05:45 AM
I suppose you could keep track of all the links in the page and change the colors yourself using the onclick handler.

mattijs72
03-27-2003, 06:48 AM
but how would I do this? The links are in different frames.
How can I use the onclick handler?

thanks

DaveSW
03-27-2003, 07:05 AM
In your css, what happens if you specify an offsite color? Make it the same as the active color.


A:link {
text-decoration: none;
font-weight: bold;
color: #f00;
}

A:visited {
text-decoration: none;
font-weight: bold;
color: #f00;
}

A:active {
text-decoration: none;
font-weight: bold;
color: #C00;
}

A:hover {
text-decoration: none;
color: #060;
background: #Ffc;
}

A.offsite {
text-decoration: none;
font-weight: normal;
color: #C00;
}

dave

mattijs72
03-27-2003, 07:11 AM
offsite color?? Never hear of that.
Does that mean that if I define an offsite color in one frame, and press a link in another frame, the link color in the first frame will change into this offsite color??

thank in advance!

mattijs72
03-27-2003, 07:15 AM
Tried specifying an offsite color in the css. But that did not help.