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: Wednesday July 18 2012 - 06:07:18

Current Page indicator


Poster: ucdesign
Dated: Wednesday November 6 2002 - 14:43:39 GMT

Hi, could someone give me a quick rundown of exactly how the current page indicators work? I realise I can specify the font and bg colour in the style array, but I'm assuming there's something else to do? Please tell me I don't have to specify sep styles for each menu? Also, does the latest ver still use the filename to figure this out? If so, bum! Anyone got a function call fix or similar? :?

Thanks for any help

Re: Current Page indicator


Poster: kevin3442
Dated: Wednesday November 6 2002 - 19:57:39 GMT

Hi,
ucdesign wrote:
...but I'm assuming there's something else to do? Please tell me I don't have to specify sep styles for each menu?...

There is nothing else to do. If you specify font color and background color for the current page, they will be used automatically. Note that if you want to use this feature, you must specify both font and background color; setting only one has generated errors for me.

You don't have to have a different style for each menu. Each menu uses the style that is set in its menu array. I suppose if you wanted to have a different Current Page Font or Background color for each different submenu, then yes, you would have to set up and use different styles. But if you want to use the same current page font/background color combination in all menus, then one style will suffice.

As to how it works internally... Don't know, but I assume its functionality has not changed, since I have seen no indication of such a change in the release notes.

Hope that helps,

Kevin

Current Page indicator


Poster: ucdesign
Dated: Thursday November 7 2002 - 0:30:39 GMT

Thanks Kevin, I'll have a closer look at it.

EDITED...

I've been having a closer look at this...

I've specified both font and bg colours and nothing seems to work (whether hex or english colour specs). The menu displays fine. Just not the 'current page' colours. I guess I was asking 'how' it figured out what the 'current page' was (in order to apply appropriate colours). If I knew that, then I'd be on the way to figuring out what I'm doing wrong. Here's some sample code if it helps:

style1=[...
....
"Purple", // Current Page Item Font Color
"Pink", // Current Page Item Background
..]

,"Member Services  ","show-menu=MemSvsSub","default.asp","",1

later...

addmenu(menu=["MemSvsSub",,,145,1,"",style1,,"left","",,,,,,,,,,,,
,"Change Password","cpass.asp",,"Change your Members Only log-in password",0])

That's it, all that's required?

When I click on "Change Password", and go to that page, I gather the "Change Password" item in the menu should be the Purple, Pink combo as specified in the "Current Page" font and bg colours. It's not... It's just the bg and font colours specified in the style.

I don't want to specify diff current page font,bg colours for diff menus. Just one set. All my menus are set to "style1" as above.

I gotta be doing something else wrong. Any ideas?

Thanks


Poster: kevin3442
Dated: Thursday November 7 2002 - 8:14:30 GMT

Do you have a URL you can post? It's often easier for the denizens of this forum to help you if they can actually see what's going on and examine the code.

Kevin


Poster: ucdesign
Dated: Thursday November 7 2002 - 12:41:37 GMT

No, if I could have posted a URL I would have done it already.
I don't have the code on a server at this time, and I'm running it locally on PWS and Win98 (however that doesn't seem to be the prob as I have the same prob on IIS 5 and NT Server).

I noticed in the "bugs" area that someone else was complaining about a similar problem, however there's been no response to his post... He talks of the current menu colour changing intermitently, or not at all. Sounds similar?

Just one additional note. I've changed the code VERY LITTLE from the sample provided on this site. Even the ORIGINAL sample i've just tested does not work. I'm running IE 6.0.2600.0000IC. The other (IIS setup) runs IE 6, Netscape 7, Opera 6 - no good on any platform (but no errors). This has gotta be something I'm missing, or simply a bug - maybe not with the JS code...