Skip to Main Content
JavaScript Application Cookbook
book

JavaScript Application Cookbook

by Jerry Bradenbaugh
October 1999
Intermediate to advanced content levelIntermediate 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.
Start your free trial

You might also like

JavaScript Application Design

JavaScript Application Design

Nicolas Bevacqua
JavaScript Cookbook

JavaScript Cookbook

Shelley Powers

Publisher Resources

ISBN: 1565925777Supplemental ContentOtherErrata Page