There are two AutoComplete widgets on this page that each point to a
different DS_JSArray DataSource instance. Driving each DataSource is a local
JavaScript array of strings: statesArray
and areaCodesArray
.
By pointing to arrays that are already loaded into memory the widget is
very fast to return data.
Enabling the
prehighlightClassName
feature provides supplemental visual
feedback for mouse events on results in the container.
The formatResult
method of the second AutoComplete instance
has been enhanced to display two data fields in the container, and the
forceSelection
property has been enabled to prevent the user from
typing in a free-form selection.
CSS:
Markup:
JavaScript:
Note: Logging and debugging is currently turned off for this example.
Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings