Other versions:

AutoCompleter (v1.1)

Project AutoCompleter Showcase This AutoCompleter script for MooTools provides the functionality for text suggestion and completion. It features different data-sources (local, JSON or XML), a variety of user interactions, custom formatting, multiple selection, animations and much more.

Showcases:

Showcase “Local Tag”

Autocompleted tags in input fields and textareas, controlled by keyboard and mouse.

The Action Happens Here

del.icio.us / search (Suggestions from top tags)

JavaScript & MooTools

document.addEvent('domready', function() {
 
	// Test source, list of tags from http://del.icio.us/tag/
	var tokens = ['.net', '2008', '3d', 'advertising', 'ajax', 'appengine', 'apple', 'architecture', 'art', 'article', 'articles', 'audio', 'blog', 'blogging', 'blogs', 'books', 'business', 'china', 'community', 'computer', 'cooking', 'cool', 'css', 'culture', 'design', 'development', 'diy', 'download', 'education', 'english', 'environment', 'fashion', 'fic', 'film', 'finance', 'firefox', 'flash', 'flex', 'flickr', 'fonts', 'food', 'free', 'freeware', 'fun', 'funny', 'gallery', 'games', 'generator', 'git', 'google', 'government', 'graphics', 'green', 'hardware', 'health', 'history', 'home', 'howto', 'humor', 'illustration', 'imported', 'inspiration', 'interactive', 'internet', 'java', 'javascript', 'job', 'jobs', 'language', 'law', 'library', 'linux', 'mac', 'maps', 'marketing', 'math', 'media', 'microsoft', 'mobile', 'money', 'mp3', 'music', 'news', 'online', 'opensource', 'osx', 'photo', 'photography', 'photos', 'photoshop', 'php', 'politics', 'portfolio', 'productivity', 'programming', 'python', 'rails', 'recipe', 'recipes', 'reference', 'research', 'resources', 'ruby', 'school', 'science', 'search', 'security', 'seo', 'sga', 'shopping', 'slash', 'social', 'software', 'statistics', 'teaching', 'tech', 'technology', 'tips', 'todo', 'tools', 'toread', 'travel', 'tutorial', 'tutorials', 'tv', 'twitter', 'typography', 'ubuntu', 'video', 'visualization', 'web', 'web2.0', 'webdesign', 'webdev', 'wiki', 'windows', 'wordpress', 'work', 'writing', 'youtube'];
 
	// Our instance for the element with id "demo-local"
	new Autocompleter.Local('demo-local', tokens, {
		'minLength': 1, // We need at least 1 character
		'selectMode': 'type-ahead', // Instant completion
		'multiple': true // Tag support, by default comma separated
	});
 
	// Our instance for the element with id "demo-local-2", the textarea
	new Autocompleter.Local('demo-local-2', tokens, {
		'minLength': 1, // We need at least 1 character
		'selectMode': 'type-ahead', // Instant completion
		'multiple': true // Tag support, by default comma separated
	});
 
});

XHTML Markup

<form action="http://del.icio.us/search/" method="get" id="form-demo">
	<fieldset>
 
		<legend><a href="http://del.icio.us/">del.icio.us</a> / search <small>(Suggestions from <a href="http://del.icio.us/tag/">top tags</a>)</small></legend>
		<label>
			<input type="text" name="p" id="demo-local" />
		</label>
 
		<label>
			<textarea name="p_long" id="demo-local-2" style="height: 100px;"></textarea>
		</label>
 
	</fieldset>
</form>

CSS Stylesheet

#demo-local
{
	width:				350px;
	border:				1px solid #444;
}

This example and the accompanying sources/assets are © 2008-2009 by Harald Kirschner and available under The MIT License. For debugging and profiling the scripts and their markup download Firefox and use addons like Firebug and Web Developer Toolbar.

Share it: Stumble it!Digg This!del.icio.us (388 Posts: )

discussion by DISQUS 261 Comments

Please use the support forums for discussing the project, asking questions or posting bug-fixes!

Sort:
Comments 261 – 261 of 261:
  • reply
    Avatar
    digitarald Site Owner
    replied 2 years ago (1 Point)
    I'll add the showcases next week. I have the code already here but need to convert it into a showcase. And I found the [problem](#changelog) why you can't click the items, thx for reporting.
Comments 261 – 261 of 261:

Post your comment

Please use the support forums for discussing the project, asking questions or posting bug-fixes!


Internet Consultant & Contractor

I'm available to combine forces with you and your team to find the most simple, elegant and convenient web solutions . I await your call.

If you just like my work and want to say Thank You, donate via PayPal or Amazon Wish List.

Developer Resources & Tools