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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:10

can i specify a url AND keep the link dead?

Poster: tseboe
Dated: Monday September 22 2003 - 17:41:46 BST


i like the feature (pagecolor and pagebgcolor) in which you specify the url so that when you're on that page, the menu item changes color. however, i don't like links beign active for the page your on.

as an example:
when im on a homepage, i'd like the home menu item to be "highlighted" but not active.

can i specify the url, use pagecolor and pagebgcolor, and still have the link be inactive/dead?

as a secondary question, is there a way to specify MORE than one url (ie. sometimes a visitor can come to my site and the url is and other times that same homepage url is would like pagecolor and pagebgcolor to work with both urls).

*** [edit]
i've found the solution for the second question...sort of. i just have to make sure every link to my site homepage does not reference index.htm. there is still the problem that if someone did use index.htm, the menu would not be highlighted

hopefully i've explained my problems. thanks in advance for any help.


Poster: Hergio
Dated: Monday September 22 2003 - 19:45:17 BST

can i specify the url, use pagecolor and pagebgcolor, and still have the link be inactive/dead?
I do not think you can do this with the menu as is. If you are JS savvy enough you could probably hack it, but its not worth the time. Is is really that bad to allow people to click it, it doesnt hurt.

To solve your second problem, alittle javascript at the top of the page will work. Add this to solve your problem IMMEDIATELY after your BODY tag of your homepage only.

if( window.location.href == "" )
    window.location.href = "";
This will check the URL on load, and if it says index in it, it will automatically refresh itself with the new URL and reload. It will appear pretty seamless to most users. Most wont even know its happening.

thanks, i'll try that bit of code later today

Poster: tseboe
Dated: Monday September 22 2003 - 21:16:03 BST

thanks hergio.

regarding the first problem: no, it's not that bad to have an active link to the current page, it's just one of those usability guidelines i like to follow. people get confused if they click a link and it takes them nowhere.

it's always been one of my pet peeves when the logo/banner in the header of a home page is hyperlinked to the home page.


Poster: Hergio
Dated: Tuesday September 23 2003 - 21:21:30 BST

Yes I do see where you are coming from. The banner link is mainly because its on everypage and its too much of a pain to remove it only for the homepage.

If you REALLY want to make it happen, I have an idea. It involves not using the url= of the aI() and instead calling a javascript function passed a URL you want to go to. It would check to see if the URL is the same as the current page and if so, not go anywhere, otherwise it would do the window.location.href thing. But this would sort of step on the toes of the pagecolor feature. If you want me to elaborate, let me know. But basically when you click something you are able to determine the href of the hyperlink that was clicked as well as the current page URL very easily, its up to you how you use that information. ;)

Poster: tseboe
Dated: Tuesday September 23 2003 - 21:52:46 BST


for now, i've got a deadline to meet and i can't worry about it too much. really, my client could care less and will never know the difference. when i have more time i want to play with you suggestion because i mostly understand it and it should work. funny nobody has brought this up before. i wonder how many of the suggestions actually get included in future versions.


Poster: Hergio
Dated: Wednesday September 24 2003 - 1:55:45 BST

Alot. If its a good feature and it will bring a useful feature to the menu and there is a decent amount of requests for a feature, 9 out of 10 will get in. Also budget, time, and feasibility come into play as well of course. Its all Andys call. But there always will be those single requests that are so specific to a certain application, its just not worth putting in...those usually dont.