views:

2584

answers:

5

I'm using PHP and I've never really done anything with Javascript or JQuery or AJAX. I'm just wondering if there are any available solutions to accomplish the same effect of auto-completion that SO uses for entering tags.

There are plugins which can handle one word but I haven't seen any that handles multiple words.

Also, I hear JQuery is hosted on google code. Is it a good or bad idea to link directly from that?

+4  A: 

I've used

http://plugins.jquery.com/project/autocompletex

bendewey
+2  A: 

The examples here support multiple word autocomplete with jQuery

Chris Ballance
A: 

There are many tutorials out there for doing this with many libraries (not just jquery). If you learn xmlhttprequest object in javascript you won't need to use a library at all for something this simple.

Syntax
I'd like to use jquery for other things as well so I might as well just stick to it throughout the site
Joe Philllips
+4  A: 

To answer the thing about Google. I have moved over to accessing JQuery via http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js in my sites.

As more people do this means that it's more likely to be cached on user's machines, so my vote goes for good idea.

Julian
We roll this out as part of our default templates as well. Google can serve this code zipped and out of a CDN faster than us, plus if there's even a 2% chance that a visitor has this cached it's better than no chance at all.
Tom
+1 for Google load.
Wayne Khan
+3  A: 

Excellent plugin for adding tags

http://levycarneiro.com/projects/tag-it/example.html

Dmitry Nesteruk