Non-persistant click states

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
MartinSpeed
Advanced
Advanced
Posts: 18
Joined: Wed Mar 21, 2007 3:46 pm

Non-persistant click states

Post by MartinSpeed »

Good Morning Milonic, i hope you are all good today.

I want my menu to have a clicked state to show what current menu item is being viewed. But i don't want this to persist.

I have menu
*Home
*Information
*Shop
*Contact


when the user clicks Shop, i want to change the background colour to show that the shop page is being viewed. But when i click Information, i want the shop item to revert back to it's unclicked state and have information in it's clicked state (as that is now the active menu item).

Any ideas on how to go about this. I have looked through the properties pages and assumed it would be something to do with the 'click' variables, but am not 100%.
MartinSpeed
Advanced
Advanced
Posts: 18
Joined: Wed Mar 21, 2007 3:46 pm

Post by MartinSpeed »

Anyone?
mbremer
Beginner
Beginner
Posts: 9
Joined: Wed Jul 25, 2007 4:05 pm

Post by mbremer »

If I look at the documentation:
http://milonic.com/styleproperties.php

Isn't clickbgcolor the style property you want?
MartinSpeed
Advanced
Advanced
Posts: 18
Joined: Wed Mar 21, 2007 3:46 pm

Post by MartinSpeed »

Unfortunately not.

I have four separate pages, which all have the same navigational menu.

*Home.html
*Information.html
*Shop.html
*Contact.html

If i am on home.html, i want the home menuitem background, font settings to be different to the others. Then if i click on the Information menuitem, this will load Information.html, where the information menuitem will have a different background colour and font settings and the home menuitem will have reverted back to it's default.

I understand i could do this with 4 separate menus. But the examples i have used here is just an example, my actual menu has alot more items and includes sub items, which means it would be involve too many separate menus, so this route isn't any option.

As suggested above, clickbgcolor only changes the background for flash, when the new page loads up it has reverted back to it's normal state.
MartinSpeed
Advanced
Advanced
Posts: 18
Joined: Wed Mar 21, 2007 3:46 pm

Post by MartinSpeed »

something like visitedcolor which only remembers the last click, and allows background colour, font styles and borders to be set.
mbremer
Beginner
Beginner
Posts: 9
Joined: Wed Jul 25, 2007 4:05 pm

Post by mbremer »

I think these style attributes can also be set with a piece of javascript. So you load in each page the same menu, but apply in every page an extra piece of javascript that sets the appropriate style for a particular menu item.

The alternative is to set per page a stylesheet property (either inline or via a CSS file):
http://support.milonic.com/beginners/cs ... amples.htm
Post Reply