Autocompleter.Local

Using a local object already loaded:

docs

Execute the script below and then type a letter into the input above.

 
	new Autocompleter.Local('local', countries, {
		minLength: 1, // We wait for at least one character
		overflow: true // Overflow for more entries
	});
execute this code

Autocompleter.Local, multiple

This is one of the things we added to the class, a "multi" option:

Execute the script below and then type a letter into the input above.

new Autocompleter.Local($('localmulti'), countries, {
  minLength: 1, //Wait for at least one character
	selectMod: 'type-ahead', //Instant completion
	multiple: true
});
execute this code

Now, if you're doing to do multiple values it's far better to remove the entries from the field and instead inject them into another dom element to make a list. But if you want to support it within an input, you can.

cnet-libraries/11-3rdparty/02-autocompleter.local.txt · Last modified: 2008/11/17 23:25