Overview of the On-line Bookmall Web Site

[ LiB ]

Overview of the On-line Bookmall Web Site

The rest of this chapter provides you with the opportunity to put your new JavaScript programming skills to work by creating a Web site called Jerry's On-line Bookmall. The idea behind this site is that a book vendor (me) has joined several online bookstores' associate programs. These associate programs pay a percentage on every sale that is made as a result of somebody entering a bookstore's Web site through Jerry's On-line Bookmall.

This works because each online bookstore provides a specifically formatted link that, when clicked, enables any traffic originating from Jerry's On-line Bookmall to be tracked. Because some people might have an online bookstore at which they like to shop, you might decide against joining just one major online bookstore's associate program.


You can learn more about each online bookstore's associate program by visiting its Web site, where you can read all about the rules of the program and apply instantly. As you might suppose, bookstores are not the only businesses on the Internet that provide opportunities through associate programs.With just a little surfing, you can find dozens of other opportunities.

Jerry's On-line Bookmall is a relatively small Web site made up of a small collection of HTML pages. The Web site starts off with a typical index page from which other pages in the site are linked. In addition to displaying a welcome message and standard HTML links, the index page contains JavaScript statements that add the following functionality:

  • Cookie logic for the collection and display of visitor names

  • Code to open a new window and display a featured book selection

  • A rotating advertisement banner that promotes other fictitious sites belonging to Jerry

  • A browser detection example

The next page in this Web site that uses JavaScript is the navigation frame in the actual bookstore section of the Web site. Here, mouse event handlers are embedded in HTML links that provide rollover effects for five target options, including a welcome page, links to three major online bookstores, and a Jerry's Picks page.

The Jerry's Picks page demonstrates the use of mouse events to post and clear messages on the browser window's status bar. These messages provide additional information about the book over which the visitor moves the mouse pointer.

As you will see, a small collection of carefully placed JavaScripts can make a big impact on any Web site. As you work your way through this sample site, I will point out other ideas for ways to use JavaScript to further enhance the Web site.


You have already learned a lot about JavaScript in this book. The focus of this final session is on applying much of what you have learned, so I won't waste your time by going over every line of code in excruciating detail and explaining things you have already seen before.Instead,I will lay out the basic structure of the Web site,list its code, and talk at a relatively high level about where and how JavaScript was used. Because of the limited space available in this morning's session, the Web site won't be 100 percent complete, but it will serve as an example and a template from which you can begin your own JavaScript experience.

[ LiB ]

Learn JavaScript In a Weekend
Learn JavaScript In a Weekend, Second Edition
ISBN: 159200086X
EAN: 2147483647
Year: 2003
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net