Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu

Auto-Completing Text Boxes

Client User Group
Site Design
Form Enhancement, Link Management
HTML, Intrinsic Controls

Sponsored Links
Developer's Paradise : Inside Technique :
Auto-Completing Text Boxes
Submission by SiteExperts Staff

Go to the resource:
Auto-Completing Text Boxes

Add to Assistant

Short Description
Create auto-completing textboxes for Internet Explorer.

Long Description
Using the Internet Explorer 4.0 TextRange object we show you how to create auto-completing textboxes. Our technique for looking up values can be easily customized to work against different types of data.

Scott Isaacs
Submission URL
Submission Date
Oct 26,1998

Discussion and Rate this Resource
Overall Rating: 4.4

anup on Feb 21, 2000 at 8:54:10 PMRating: 5
i want to create text boxes dynamically. .i.e i wish my web page to grow automatically as per the data entry need. is it possible. my knowledge about html is primitive.
mhonnen on Jun 24, 1999 at 10:17:21 AMNo Rating

I don't get text selection only completion with IE4 and 5 on windows 95. I frankly don't understand why the provided example should work unless it expects the range r1 to remain unchanged when the value of the textarea changes. That is, however, as I checked, not the case. Thus r1 and rNew are identical after the value is changed and the changing of the start to the end point empties the range. The following code change works:


function update(src,selObject) {

if (src.createTextRange) {

// Ignore cursor keys

var sKeys="8;46;37;38;39;40;33;34;35;36;45;46"

if (sKeys.indexOf(event.keyCode+";")>-1) return

// Value has changed - do lookup

if (src.value!=src._value) {

var r1 = src.createTextRange()

var oldValue = r1.text;

var newValue = find(src.value, selObject)

if (newValue!=src.value) {


var rNew = src.createTextRange()


rNew.moveStart('character', oldValue.length)






tonybaum on May 22, 1999 at 4:17:11 AMRating: 4

I have the same problem with Auto completing text boxes. Im using IE4.01, I have now installed the MS version5.0 script engine, to fix an Activex problem and the Auto completing text boxes no longer works, has textRange been changed in version5.0


ft1000ab on Apr 26, 1999 at 5:55:12 AMNo Rating
I have IE 5, running on NT.
Scott Isaacs on Apr 21, 1999 at 7:41:01 AMNo Rating
The string should be selected. What browser version are you using?

More Ratings/ Comments

To rate and comment on a resource, you must first logon.

If you are not registered, please register yourself to become a member of the

User Name

Copyright © 1997-2008, LLC. All rights reserved.