Book Image

MooTools 1.2 Beginner's Guide

Book Image

MooTools 1.2 Beginner's Guide

Overview of this book

MooTools is a simple-to-use JavaScript library, ideal for people with basic JavaScript skills who want to elevate their web applications to a superior level. If you're a newcomer to MooTools looking to build dynamic, rich, and user-interactive web site applications this beginner's guide with its easy-to-follow step-by-step instructions is all you need to rapidly get to grips with MooTools.
Table of Contents (14 chapters)
MooTools 1.2 Beginner's Guide
Credits
About the Authors
About the Reviewer
Preface

Time for action—creating a web form that uses OverText


OverText is great for providing contextual hints about an input field. For example, an input field that takes a birth date could suggest the proper date format, or a password text field could give the user a reminder to use a strong and memorable password. In some instances, you may even consider replacing input labels with OverText to save some space. In this simple web form example, we'll use OverText for input fields.

  1. Let us create the HTML web form. We have three input fields with IDs of name, email, and dateofbirth. They also have corresponding labels for semantics and web accessibility. The most important thing to note is that our input elements have alt properties: the value of its alt property will be the text that will be shown as an over text.

    <body>
    <h1>Web Form with OverText</h1>
    <form>
    <p>
    <label for="name">Name: </label>
    <input id="name" alt="Enter first and last name" type="text...