How do we create a DHTML drop-down menu?1. In order to create a DHTML drop down menu we need JavaScript API. The API (Application Programming Interface) consists of core set of cross-browser JavaScript functions to make DHTML programming easy and quick. This API enables moving and hiding page elements as well as acts as getter and setter of page elements attributes. 2. Second we define on image object and off image object and string containing the URL of the "off" version. 3. Then we create the menu items, label items and sub-menu items. If we wish we can use images also. 4. Then we need to define our own global variables that will be used by the menu. Using global goes against oops design but makes sharing data easier. 5. Create the menubar object, adding the menu labels and writing menubars. 6. Create menu object, adding menu items and writing menus. 7. Hiding and displaying the menus and attaching stylesheet.
|
XML - What is XML?XML - XML, Extensible Markup Language, is an open, text based markup language that provides structural and semantic information to data......