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—highlighting focused fields of web forms


Let's start with our web form's HTML.

  1. We'll use<input> and<textarea> tags that will hold our user's information as well as provide them a means to submit the web form (inputtype="button"). We use the<label> tag to indicate to the user what information to put inside each form field.

    <form action="" method="get">
    <p><label for="Name">Name: </label> <input name="Name" type="text"></p>
    <p><label for="Email">Email: </label> <input name="Email" type="text"></p>
    <p><label for="Comment">Comment: </label> <textarea name="Comment" cols="" rows=""></textarea></p>
    <p><input name="Submit" type="button" value="Submit"></p>
    </form>
    

    With the above markup, this is how our form looks:

  2. Our web form is a bit dull, so how about we spruce it up a bit with some CSS? Read the comments to gain insight on some of the...