Chapter 2. It’s All About JavaScript

<feature><title>In This Chapter</title> <objective>

Understanding the Ajax and JavaScript connection

</objective>
<objective>

Writing JavaScript

</objective>
<objective>

Handling browser events

</objective>
<objective>

Writing JavaScript functions

</objective>
<objective>

Storing data in variables

</objective>
<objective>

Using JavaScript loops

</objective>
<objective>

Connecting JavaScript to buttons

</objective>
<objective>

Working with text fields from JavaScript

</objective>
</feature>

So what is this Ajax thing, anyway? You’ve heard that it’s a great way to combine some of the Web languages you’re familiar with (such as HTML, XML, CSS, and JavaScript) to create a Web application that looks and works like a seamless desktop application. But you want to know much more, and you’ve come to the right place.

As you might have heard, Ajax is based on JavaScript. And because you need a good foundation in JavaScript to use Ajax (and to follow many chapters in this book), this chapter is all about working with this scripting language. This book might show you how to do things you’ve never done before — even if you’ve been using JavaScript for a while. So get ready for a crash course in JavaScript. If you think you already have a solid grounding in JavaScript, feel free to jump right into working with Ajax in Chapter 3.

Taking a First Look at Ajax in Action

Here’s an sample Ajax application that demonstrates what kind of JavaScript you’ll be seeing throughout the book. ...

Get Ajax For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.