If you've ever wanted a little help with the user interfaces for your web site, you might want to learn about the Yahoo Button Control. It comes from Yahoo's UI framework, and can help you to create an interactive and professional-looking front end for your web site. This article, the first one in a five-part series, gives you a taste of what you can do with it.
A Close Look at the Yahoo Button Control - Building a Button Control using a simple checkbox (Page 4 of 4 )
In accordance with the concepts that I expressed in the previous section, itís perfectly feasible to build a Button Control by using different web form tags. With reference to this topic in particular, I already showed you how to include a simple control into a sample web page using different form elements, such as conventional and radio buttons, so in this case Iím going to teach you how to perform the same task, but utilizing a checkbox.
Having explained that, hereís the corresponding code sample that displays on the browser a basic Yahoo! Button Control by using a common checkbox. Have a look at it, please:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
As you can see, building basic Yahoo! Control Buttons using different elements of a web form is actually a straightforward procedure that can be tackled with minor hassles. In this case, I utilized a basic checkbox to include the control into a sample web document, but the same approach can be implemented with conventional and radio buttons as well.
Finally, in order to complete the implementation of the practical example, below I included an additional screen shot, which shows the visual appearance of the Control Button created earlier:
All right, having already provided you with a decent number of demonstrative examples of how to build different Yahoo Button Controls using existing structural markup, I believe that you shouldnít have major problems working with these user interface elements on your own. As with other topics related to professional web development, practice is the best way to go.
In this first article of the series, you hopefully learned how to build basic web controls by using the neat Yahoo Button Control bundled with the Yahoo UI library. As you saw previously, all of the code samples demonstrated how to create these buttons from existing (X)HTML.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.