I've recently put together an autocompletion script that will work with an
input text field, with data either in a JS array, or in a SELECT.  It works
the same in IE6 and Mozilla 1.4.  I couldn't find the specific documentation
for the Mozilla functions used.  I had to search the CVS source tree, as the
"range" related objects (selecting a range of text) and methods particular
to DOM aren't really very well documented.  There's some documentation of
Range for Mozilla, but I'm not using any of those functions.  I just
happened to find some bits of IE and Mozilla specific autocompletion on the
web, and took and merged them.

Would something like this be a useful utility for the DynAPI?  If so, where
should it go?  If the code needs modifying for DynAPI integration, I might
need some pointers.  If the example doesn't work in a browser (Opera, etc.)
I'd need someone else to fix it as I don't have access to other browsers
yet.

Leif
Title: Cross-browser autocompletion

Cross-browser autocompletion

  • autocomplete a text field with data in array
  • autocomplete a text field with data in a select field
Supported Browsers:
  • Internet Explorer 6
  • Mozilla 1.4
aardvark
antipathy
baseball
basketball
train
train station
aardvark antipathy baseball basketball train train station
aardvark antipathy baseball basketball train train station

Reply via email to