O'Reilly logo

YUI 2.8 Learning the Library by Dan Wellman, Daniel Barreiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Button Control

Let's play with some of the available Button controls. During this example, we'll create the page displayed in the following screenshot:

Using the Button Control

For this example, our template will include the habitual yahoo-dom-events.js, element.js, and button-min.js. In the body of the page, we'll add the following HTML:

<h1>Please complete this form</h1> <form method="post" action="#" id="testform" name="testform"> <div class="formdiv"> <label for="fname">Please enter your first name: </label> <input id="fname" class="field" type="text" name="fname"> </div> <div class="formdiv"> <label for="lname">Please enter your last name: </label> <input ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required