spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column15


A Final Word

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

In this column we introduced a useful technique for providing a long list of sites in a JavaScript menu. Rather than having to scroll through the list to find the desired site, the user can enter the first few characters and the script automatically selects the matching option. This column focused on forms and event handlers. We explained several algorithms for the lookup list.

The script must be able to detect when the user presses a key, so it only works on fourth-generation browsers. However, the script works on both Navigator 4.0x and Internet Explorer 4.0x, and gracefully downgrades for older browsers by:

  • providing a simple list for JavaScript-enabled browsers that support the Array object.
  • not displaying anything on other browsers.

In this column you learned:

  1. How to define the basic global variables for the script.
  2. How to initialize the lookup list.
  3. How to print the list's HTML code via JavaScript.
  4. How to update the text field when the user manually changes the selection.
  5. How to select a matching option.

For your convenience, you may also view the entire code.

More Resources from Doc JavaScript
Columns Popular Columns Tips Tools
Latest Columns
41-50 | 31-40 | 21-30
11-20 | 1-10
Working with Windows
JavaScript and Frames
Bookmarklets
Random Tips
Personalized Tips
RSS Channels
Menu Builder
Rollover Builder
Rotation Builder
Reference Tip Categories (want one?)
Links
For Your Site
Did you learn something? Do you like this site? Please link to us!

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Created: March 11, 1998
Revised: March 11, 1998

URL: http://www.webreference.com/js/column15/final.html