Creating Submit Buttons and Drop-down Menus with the Yahoo Button Control
(Page 1 of 4 )
Buttons are undoubtedly an important part of many web-based user interfaces these days. So if you’re interested in learning how to build these elements with minor hassles, then you should start looking at the useful Button Control, which is bundled with the popular Yahoo UI DHTML framework.
Welcome to the final installment of the series that began with “A close look at the Yahoo Button Control.” As its title clearly suggests, this series analyzes this handy Yahoo widget in detail and shows you how to take advantage of its numerous features through copious and illustrative hands-on examples.
Having already introduced you to the main subject of this series, it’s time to quickly refresh your memory of the topics that were treated during the preceding tutorial. You’ll possibly recall that I showed you how to build a specific type of button, called “link,” from inside the context of the Yahoo UI framework, which as its name implies, comes in handy for creating professional-looking buttons that can be linked directly to a specified URL.
Even though the functionality offered by the aforementioned “link” buttons seem rather limited at first glance, the truth is that these controls can be useful in certain situations. They can be created either by using some basic “<a>” tags or with a few lines of JavaScript code.
Nevertheless, the Yahoo! Button Control provides web developers not only with the capacity for building different types of buttons with minor hassles (most of them have been covered in the previous articles of the series), but also the possibility of creating several eye-catching drop-down menus by utilizing some existing <select> elements. This sounds really interesting, right?
Considering that the implementation of navigational menus with the Yahoo! Button Control can be potentially useful to your existing or future web projects, in this last part of the series I’ll show you how to build them with minimal effort, and also teach you how to use this handy control to emulate the behavior of reset and submit web form controls.
With the preliminaries out of the way, let’s find out together how to build dynamic drop-down menus and submit buttons utilizing the functionality of the Yahoo! Button Control. It’s going to be an instructive experience!
Next: Submitting web forms with the Yahoo Button Control >>
More JavaScript Articles
More By Alejandro Gervasio