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:32

onClick=return false


Poster: bomz
Dated: Wednesday April 21 2004 - 14:50:03 BST

Is it me or clickfunction does not work as onClick? What I'm trying to do is something like this (just idea, implementation is more complex):

<a href="http://www.nba.com" onClick="return false;">

This link should be disabled. How to do it with 5v menu? aI("url=http://www.nba.com;clickfunction=return false;") won't work. Please advise.


Poster: kevin3442
Dated: Saturday April 24 2004 - 0:56:34 BST

Hi,

The clickfunction property is separate from the url property. Your clickfunction will still fire, but if the menu item also has a defined url, as in your example, then the browser will load that url.

If you want to disable a menu item that already has a url defined, the most direct route it to it's type property to disabled, like so:
Code:
aI("url=http://www.nba.com;type=disabled;");

This could be done effectively by (1) generating the menu dynamically from a database, or (2) changing the menu item property dynamically with javascript.

Hope that helps,

Kevin


Poster: bomz
Dated: Tuesday April 27 2004 - 8:45:55 BST

got it. Thanks