Manta alt

YOUR IBM i TRAINING SOURCE

You must allow the browser to execute JavaScript programs if you want to view product information. If your browser is set up to execute JavaScript programs, the problem is that the product ID was incorrect. Use the menu bar above to find the desired product.

Overview

Audio

The previous course of this series, Coding JavaScript, describes the generic JavaScript language that is defined by the internationally accepted ECMA standard. This course expands on this knowledge to show you how to use JavaScript statements to manipulate the HTML/XHTML elements that make up a web page.

The course begins by describing how a browser event can cause a JavaScript function to be invoked. It then covers the properties and methods used to manipulate window, document, and form objects. The remainder of the course presents JavaScript examples that you can use in your own ebusiness applications. In particular, you will learn how to validate form data and manage cookies.

Approximate Study Time: 2.5 hours

Objectives

After completing this course, you should be able to:

  • Cause a JavaScript function to be invoked as the result of a browser event
  • Code JavaScript statements to perform the following tasks:
    • Reference an object within the same window, a subwindow, the parent window, or a frame
    • Display a message in an independent browser window
    • Create, write to, and close a subwindow
    • Replace the document displayed in the browser window
    • Prompt the user for an input value or a confirmation
  • Reference form components from a JavaScript program
  • Check user-supplied form data for validity
  • Identify the advantages and disadvantages of the various ways to display error messages
  • Modify an HTML form to invoke a JavaScript function
  • Code JavaScript functions to create, retrieve, update, or delete a cookie

Topic Outline

Handling Events

Manipulating Window Objects

Manipulating Document Objects

Referencing Form Data

Editing Input Data

Using Cookies

Audience

This course should be taken by individuals responsible for implementing an organization's web site. The audience includes webmasters, content developers, application programmers, and system administrators.

Prerequisites

This course assumes that you understand of the role of HTML, JavaScript, Java servlets, and CGI programs in an ebusiness environment and that you can code HTML/XHTML and basic JavaScript statements. These prerequisites can be satisfied by completing the previous courses of this series:

You may also have obtained these skills by taking other courses or through relevant work experience.