Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:49

Change font color while "active".


Poster: fotops
Dated: Tuesday January 6 2004 - 18:12:35 GMT

I have a horizonal menu across the top of my webpage,
only a main menu, no drop downs.
Is there a way to have the text-link last clicked be an alternative color,
and stay that way until another link is clicked, etc.?
And to start the menu with the "Home" link the 'active' color.

thanx, fotops


Poster: timrivera
Dated: Thursday January 8 2004 - 2:13:41 GMT

I'm confused. If a person clicks a link, wouldn't they be taken to another page? If you want the link for the current page to be a different color, just use pagecolor.


Tim


Poster: fotops
Dated: Thursday January 8 2004 - 4:28:45 GMT

The top navigation bar targets content pages to appear in a large Iframe.
So the main page doesn't change, but the content in the Iframe does.

When a visitor clicks on a top-link, it should change color and stay until another top-link is clicked.

I thought it was a "keepalive" thing, but I never figured that out.

see page at http://www.fotops.com/nova

thanx, fotops


Poster: Maz
Dated: Thursday January 8 2004 - 11:01:57 GMT

I think keepalive keeps the menu open when clicked on.

In Safari the menu items are all bunched up.

You have milonicsrc.js first,

Then you are missing the script tags for mmenudom.js and mmenuns.js

Followed by your menudata.

Are you using a menuwidth?

Regards,
maz


Poster: John
Dated: Thursday January 8 2004 - 14:40:28 GMT

One problem is you are way down level. You're running 3.3.19, and the last v3 release was 3.5.15, probably around 25 or so versions ahead of yours.

Note also that v3 is no longer developed or supported, as announced.


Poster: John
Dated: Thursday January 8 2004 - 14:42:52 GMT

Tim, just an FYI - you can 'edit' your own posts to make corrections (button in the upper right of the post).


Poster: fotops
Dated: Thursday January 8 2004 - 16:28:43 GMT

Your right on version, my bad.
I downloaded version 5 and applied it to the final rendition of the website.

view it at: http://64.143.45.40/indexNew2.htm

thanx again,

fotops


Poster: John
Dated: Thursday January 8 2004 - 16:34:08 GMT

Looks good!


Poster: fotops
Dated: Thursday January 8 2004 - 17:31:38 GMT

Thank you!

So how do I keep the top nav link highlighted while "active"?

fotops


Poster: Lilly
Dated: Saturday January 10 2004 - 0:35:22 GMT

:( Same question here:

'So how do I keep the top nav link highlighted while "active"?

I'm using version 5 (registed version) and have a frames based menu.

Please help me out here


Poster: Hergio
Dated: Saturday January 10 2004 - 4:48:03 GMT

As Tim said, please define your interpretation of "active". Is active the item being hovered over? Is it the menu item that pertains to the current page? Is it the menu item that was last clicked?

If its the last one, what you are requesting is confusing because if you clicked a menu item, would it not take you to a particular page? If you are on a certain page and you want the menu item link that points to the page being viewed to be highlighed you can use the PAGECOLOR property of the menus. See the menu on http://www.milonic.com so see it in action. Click a link in the samples menu and after you are viewing a sample, you will see the menu item for that sample highlighted in the menu at top. Hope this helps.


Poster: timrivera
Dated: Saturday January 10 2004 - 4:59:02 GMT

Hergio wrote:
As Tim said, please define your interpretation of "active".


Hello Dave,

S/He is using the menu as the navigation for a framed site (using IFRAME actually), so the page that the menu is on does not change. Therefore, pagecolor would not do the job. The request is for a link to change and retain specified styles until another link is clicked. I'm thinking this may be possible with onClick.


Tim


Poster: Hergio
Dated: Saturday January 10 2004 - 6:08:34 GMT

Ahh yes, I see. You are using it to put URLs into a iframe contained in the page.

First, if this is all you are going to use the menu for, then I dont think the Milonic menu is the right thing to use. The menu is intented for opening up sub menus and hierarchial menus. You have nothing of the sort. What you should be doing is just have a table of hyperlinks along the top. In each TD cell, just have a onMouseOver and onMouseOut event changing the style class of each cell to be colored or not so you get the hover over effect. And the hyperlink you could just point to open in the iframe. As tim said, you'd also have an onClick event that when a hyperlink along the top is clicked, it would de-highlight all the links along the top and then highlight the one that was clicked.

If you want to stick with the menu, you could use the clickfunction property of the menu item. You could also say aI("text=foo;url=javascript:foobar();")
But the clickfunction is still being implemented so it may not work right out. But you'd have this clickfunction call a javascript function that would edit the innards of the menu to change the look of the menu item clicked. As well as edit all the others so they aren't highlighted. That might get alittle complicated, but can be done.

I think it would be easier the first way I suggested. I just dont see you using the menu the way it was intended. Maybe I am wrong though.


Poster: Hergio
Dated: Saturday January 10 2004 - 6:10:15 GMT

And if you have any further questions, probably go to the v5 forum now that you have switched over to the newer menu! BTW, thanks for doing that. But we can finish up this thread here. Just FYI. ;)


Poster: Lilly
Dated: Saturday January 10 2004 - 11:37:22 GMT

Hi guys

How sweet you are all guessing what's wrong, sorry about the explenation I will explain better:

I'm not using Iframes, I'm user real frames (like http://www.milonic.com/menu/frames/ ).

What I mean is that the 'current page' that the user is viseting to show the same font and text properties as a mouse over, this use to work with the settings: 'Current Page Item Font Color' and 'Current Page Item Background Color' but stops funtioning when the menu is user in frames (real frames, no Iframes)

I also do not understand:

Quote:
I think it would be easier the first way I suggested. I just dont see you using the menu the way it was intended. Maybe I am wrong though.


How do you mean/know? My menu has 7 top Items, 4 sub menu's with 17 items and 5 sub-sub menu's in that. I also do not undersatnd how you know, I could not find any member details matching yours, the menu in insite the pay site. Maybe you are mixed up with someone else.

Image

I hope I have explained a bit better.
Thank you and regards Lilly


Poster: Hergio
Dated: Sunday January 11 2004 - 4:20:31 GMT

I was referring to fotops site, my apologies.

And tim explained why, because when you are using a framed site the URL in the browser isnt changing when you are changing pages. The menu looks at that url to decide how to highlight the pages. As of right now there is no way using the current menu functionality to have a menu item stay highlighted from a click.