Indicator for the currently clicked menu item (aka Checked)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
screenmates
Advanced
Advanced
Posts: 26
Joined: Tue Jan 23, 2007 3:35 pm

Indicator for the currently clicked menu item (aka Checked)

Post by screenmates »

How do I go about indicating the currently clicked menu item similar to Milonic's menu on their website:

DHTML Menu -> DHTML Menu Samples

On clicking any sample, the page loads and the submenu item now shows with two hyphens to its left indicating the currently selected item. I may use an checked image or make the menu item bold or convert it to a header item (unclickable) to indicate its selected status. I could not find any documentation on indicating the currently clicked item. I use PHP based menu and can use cookies (if that's the way it should be done) if someone could throw some idea how to go about it.

Please help...
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, the you are here thing is done with the menu parameter page'whatever', i.e. pageimage, pagebgcolor, pagebgimage and so on.

The reason for what looks like the two dots is that in the vertStyle you have coding for a page image

Code: Select all

pageimage="/images/db_red.gif"; 
The style for the samples submenu, the one with all the samples listed is created using the copyOf method. This copies whatever style is listed using that style and including whatever is listed in the copyOf. So, in this case it copies the vertStyle,

Code: Select all

sampleStyle=new copyOf(vertStyle) 
sampleStyle.fontsize="60%" 
sampleStyle.padding=1 
sampleStyle.imageheight=1 
sampleStyle.imagewidth=20 
then puts in the imageheight as 1 and width 20, this makes the original image which is 7 high by 13 wide look like those two dots. If you wanted you could just make yourself an image of two dots and make your submenu style have pageimage='whatever that image';

You might want to take a look in this forum at the Styling the menu posts. These are extremely basic and a quick read, but they might give you some ideas

viewforum.php?f=14


Ruth
Post Reply