Syntax Breakdown

Let’s have a look at Shopping Bag’s flow chart. Figure 8.9 shows how the user begins shopping, browses and chooses products, makes final changes at check out time, fills out payment and shipping info, and eventually submits the entire order to the server.

Shopping Bag overview

Figure 8-9. Shopping Bag overview

This application consists of eight files. This list describes each file and its purpose:

index.html

This opening page of Shopping Bag handles window management.

shopset.html

The frameset for the full-screen remote window. Contains both intro.html and manager.html.

intro.html

The default page for the largest of the frames and also the help document that lists the function of each navigation bar feature.

manager.html

This is the Shopping Bag epicenter. All core functionality comes from code in this file, which will be the primary focus of the chapter.

inventory.js

Contains functions, constructors, and arrays for building the Shopping Bag inventory. Much of its work occurs during loading.

search/index.html

The frameset that loads the product search application. If you’ve even glanced at Chapter 1, you’ll recognize this as a modified version of the search engine covered there.

search/main.html

The help page for the search engine. Complete with examples.

search/nav.html

The brains of the search engine application.

Because of the size of the application and the ...

Get JavaScript Application Cookbook 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.