Previous: JavaScript and HTML Forms

Summary

In this chapter, you saw some advanced JavaScript issues focusing on how to react to user input. The chapter began with a discussion of event handlers and how they're used in conjunction with JavaScript function definitions to create scripts that respond to the user. The chapter then took a fairly in-depth look at some of the main objects of the Document Object Model, all of which can be useful for altering document, window, and page properties using a script.

After that, the chapter turned to using the DOM, event handlers, and JavaScript to respond to user's input in HTML forms. You saw how to check the data that is input into form elements, as well as how to create a form that is completely processed in JavaScript and then sent via e-mail, bypassing the CGI script approach that was discussed in Chapter 16, "CGIs and Data Gathering," in Absolute Beginner's Guide to Creating Web Pages, Second Edition.

Finally, the last section of the chapter focused on using JavaScript to change the page automatically. You saw how to redirect pages based on the Web browser brand, how to create a menu of URLs for page switching, and how to build a fairly sophisticated menu-based interface using JavaScript and HTML frames.

In "Adding Dynamic HTML Elements," you'll learn more about JavaScript and how it can work together with the CSS technology to become something that's often called Dynamic HTML.

Previous: JavaScript and HTML Forms