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.
onClick=return false
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:
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
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: Select all
aI("url=http://www.nba.com;type=disabled;");
Hope that helps,
Kevin