Custom Tag: XPMenu
Version: 1.0
(c) 2005, Rizal Firmansyah, rizal.firmansyah@masrizal.com
Disclaimer:
This custom tag was written to help developers create XP style pulldown menu easily.
This custom tag comes with a very low price.
I believe the price of this custom tag is less than an average 1 hour programmers rate.
But by using this custom tag, you save lots of your valuable time writing CF and JavaScript code to produce the same result.
And because of its very low price (esp. comparing your rate to create such a function in CF and JavaScript),
i would like to give a license to use this tag is for "1 copy per website".
That means for each website, one developer must purchase a copy of this custom tag for its use.
For full license and disclaimer about this tag, please read: license.txt
-------------------------------------------------------------------------------
XPMenu is a quick solution to create XP style unlimited-pulldown menu
*** Requirements:
ColdFusion 5, MX and up
Internet Explorer 5 and up, Mozilla Firefox 1.0 and up
*** Usage:
There are 3 custom tags needs to be in place to generate unlimited pull down menu.
Let's go through one by one:
1. cf_xpmenu_set
This is the container for all pulldown menu.
You have to use this tag in order to 'group' all pulldown menu for each set of menu.
That means you can have more than one set of pulldown menu in one page!
Please check /images folder, i have created sample for both submenuimage (xpmenu_arrow.gif) and blankimage (xpmenu_blank.gif)
These two images is required mostly when the user is using Mozilla Firefox.
2. cf_xpmenu_menu
This is custom tag to create a menu.
Please check the source code in \docs & examples to see how this custom tag works
*** Activate or deactive menu using javascript
This custom tag provides javascript functions to show, hide, activate and deactive menu element.
Below are list of Javascript functions provided by this custom tag:
1. XPMenu_ShowMenuAtObj(MenuID,obj,halign,valign,hmargin,vmargin);
To show menu...
- MenuID -> Menu Name you want to show (cf_xpmenu_menu name="name")
- obj -> object that is being attached to this function. Most of the time you will set this variable with "this"
- halign -> horizontal alignment [left/right]
- valign -> vertical alignment [top/bottom]
- hmargin -> horizontal margin
- vmargin -> vertical margin
Use this function to show menu upon action from user, for example:
- onmouseover -> your text
- onmouseclick -> your text
- oncontextmenu -> your text
2. XPMenu_HideMenu(MenuID);
To hide menu...
- MenuID -> menu name you want to hide
3. XPMenu_Enable(MenuElementName);
To enable a menu item
- MenuElementName -> the name(id) of an element you want to enable (xp_menu_element name="")
4. XPMenu_Disable(MenuElementName);
To disable a menu item
- MenuElementName -> the name(id) of an element you want to disable (xp_menu_element name="")
Please refer to given examples on how to use these functions.
*** Examples:
For a complete example, please check "\docs & examples\example.cfm"
-------------------------------------------------------------------------------
Hope you find this tag useful.
Sincerely,
Rizal Firmansyah