Skip to Content
JavaScript Application Cookbook
book

JavaScript Application Cookbook

by Jerry Bradenbaugh
October 1999
Intermediate to advanced
480 pages
14h 47m
English
O'Reilly Media, Inc.
Content preview from JavaScript Application Cookbook

Potential Extensions

Even a little bit of creativity can take you places with this application. Here are a few of the possibilities that come to mind:

  • Add fields to manipulate table cell background colors and font colors, and other elements for the layout look.

  • Allow users to choose entire page themes.

  • Add a couple of extra text fields so that the user can add his or her own favorite web site links (with names).

  • Post banner ads according to the user’s cookie preferences.

More Choices for the Layout Look

Users like lots of choices. Anything you can tweak on the user’s page can be manipulated. This includes content and graphics in layers, other frames, and remote windows.

Adding Themes

This idea stems from Windows 95’s desktop themes. Instead of letting users pick individual items, such as font face, size, and color, why not offer a couple of layout themes that make the choices all at once? Suppose you have a music-related web site. Consider the following select list:

<SELECT NAME="themes"onChange="swapImage('theImage',
   this.options[this.selectedIndex].value);">
<OPTION VALUE="none">None
<OPTION VALUE="bigband">Big Band
<OPTION VALUE="rocknroll">Rock 'n Roll
<OPTION VALUE="rap">Rap
<OPTION VALUE="country">Country
<OPTION VALUE="reggae">Reggae
<OPTION VALUE="grunge">Grunge
<OPTION VALUE="jazz">Jazz
<OPTION VALUE="club">Club Music
</SELECT>

Each of those OPTION values could relate to a thumbnail image of the potential theme. You can even use genSelect() and swapImage() in prefs.html ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JavaScript Cookbook

JavaScript Cookbook

Shelley Powers

Publisher Resources

ISBN: 1565925777OtherErrata Page