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

Creating a Request object


In order to start utilizing the Ajax features of MooTools, let's take a few moments to discuss the Request class.

The Request class is MooTools' class for creating Request objects for dealing with Ajax-based HTTP server-side/client-side communication. With this class, you'll be able to easily send and retrieve data, as well as perform useful operations on these data.

To create a Request object, use the following format:

var requestObject = new Request(options);

The Request class is feature-packed; it has oodles of options for making your life as an Ajax developer much easier. Let's look at the options available to you.

Request object options

In the following table, you will see the Request class options. You will see the option name, the data type that it accepts, its default value, and what it's for. We will use several of these throughout the chapter, so it would be ideal if you reviewed them now.

Request option

Data type / Default value

What it does

url

String...