magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 05 > Script Junkie  

A Shopping Cart Application with JavaScript

By Reaz Hoque

Already a strong contender, e-commerce promises to be a multibillion dollar industry by the year 2000. One success story, of course, is amazon.com, where you can browse through millions of books and place orders online. But amazon.com's resources aren't available to every Joe on the Web. Further, not every Joe needs to create a huge site that will connect to a multidimensional database, or perform credit-card processing against VISA or Mastercard servers. If you have only a few products that you want to sell on the Web, stay tuned. I'll show you how easy it is to create your own online shopping application using JavaScript and a little bit of HTML.

In this article, I'll walk you through the steps required to create a site with a client-side database that can reasonably hold as many as 1000 products. The script uses an array, jigowat, to store product information for each item in the database, and a second array, cart, to store the items checked out for purchase. Once all shopping has been completed, the script provides methods to submit a completed form securely through the Web or email, or by printing out a copy and sending it through conventional mail. Because we'll be using client-side JavaScript, users will be able to browse and shop a lot faster than they would if we used server-side technology.

How It Looks

As an example, we'll study a shopping-cart demo created by Fabric8.c




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2