JavaScript
  Home arrow JavaScript arrow Suggest As You Type
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Suggest As You Type
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 17
    2004-04-19

    Table of Contents:
  • Suggest As You Type
  • The Plan
  • The Suggestion Function
  • The End

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Suggest As You Type


    (Page 1 of 4 )

    In our ongoing quest to create the ultimate application, usability and familiarity are often given far too little thought. This article explains a very effective way of giving users a comfortable environment, by mimicking a popular piece of GUI functionality. I will show you how to create a tool that captures characters as you type, and tries to match them to items in a <select> menu. This is a great way to speed up the process of selecting a specific item within a large list, or just suggesting a similar item to what the user has typed.

    Introduction

    Our responsibilities as application developers are heavy and numerous. In fact, so numerous, that sometimes we may have the tendency to adhere to and fulfill our favorites, and leave the others floating in limbo. Our logical and rational minds think of many wonderful ways to solve life's computing problems, but fail to consider how the end user feels about our solution. We believe our application is perfect, it meets all technical requirements and then some. But why is adoption rate so low? One word: usability.

    Already you're wondering what the previous paragraph has to do with the subject of this article. Let me expand a little further. Usability is key to users enjoying and adopting our applications. And as far as usability goes, people in general have become accustomed to a few standard pieces of functionality in the world of user interfaces.  This article will deal with one of those pieces in particular, the ability to find items as you type.

    Think of any program that displays a long list of unique items: a file browser, an e-mail application, Active Directory, etc. Within any of these programs, you have the option of typing in a few letters, and the program takes those letters and suggests the specific item you may be looking for. If you wanted to find my name in an address book, you could type in 'jus', and you could expect to be led straight to me. It's a wonderfully handy shortcut, something most of us couldn't do without.

    But now consider your web-based application. Commonly, we employ <select> menus to hold long lists of items. But what happens if you want to find one specific item, like my name again? Type in 'jus', and first the list will jump to the first 'j' item, then to the 'u' item if any exist, and then to the 's' items. It's really quite frustrating, as you're now forced to scroll through the list with your mouse as well, and manually find your item. And 'manually' is precisely the thing we're trying to eliminate by designing and building software!

    Wouldn't it be great if we could develop some way of imitating that 'suggest as you type' sort of functionality, and make the user's life so much easier? (the answer is yes by the way) Well, as you're already expecting by having read the title of this article, I'm going to show you how to do exactly that! No more leaving usability in limbo!

    More JavaScript Articles
    More By Justin Cook


     

    JAVASCRIPT ARTICLES

    - Using Click Interceptions with a Database-Dr...
    - Using JavaScript Click Interceptions in an I...
    - Using Click Interceptions with JavaScript
    - QuickSort in Action
    - Quicksort
    - Using Mod_Security to Protect Your Server
    - Detecting and Countering Server Intrusions
    - Securing Your Web Server
    - Building a Secure Web Server
    - Protecting the Server
    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT