JavaScript for E-Commerce

Back | Contents | Next
Please note that this tutorial was first published in the year 2000, and is based on work conducted between 1997 and 2000. While we trust that it still constitutes useful tutorial material, it should not necessarily be construed as to impart best practice in the year 2017. For more details please see this blog post.

The Ordering Process

At this point we have a navigable online shop, with one glaring omission - there is no way for a customer to actually select items to order. To this end, we are going to add two things to FOMS:

  1. Checkboxes next to each item so that the customer can select them.
  2. A frame at the bottom of the screen to display a list of currently selected items, and a button the customer can click to finalize the order.

We need to modify the item-cd-blues.html, item-cd-techno.html, ..., item-record-classical.html, files to include checkboxes and JavaScript code to add items to the myOrderList object created in the index.html file.

We need to modify the index.html file to include another frame for the list of selected items, and we need to add JavaScript code to generate this list.

A minor modification needs to be made to the item-initial.html file so that the JavaScript code knows that no items are currently being listed when this file is active.

Back | Contents | Next

This tutorial has been translated to Serbo-Croatian language by Jovana Milutinovich from

This tutorial has been translated to Slovak by Juraj Rehorovsky from Coupofy team.

If you find this tutorial useful and want to show your apprectiation, a small donation is most welcome, either in Bitcoins to 19QpWDmZPmTqawcr8VsXcbdc4Znq1ecrza, or via PayPal.