Solved

Fast JavaScript Autocomplete

Posted on 2007-12-06
4
1,262 Views
Last Modified: 2013-11-19
I'm looking for an autocomplete script that I can use on my LAMP platform.

I have tried scriptaculous and it works fine but in IE it is VERY VERY VERY slow and unusable. The datasets being returned are quite large too.

The user is inputting country codes for phone numbers. So after they enter one digit, quite a few results come back, for instance, after you type the number '1', 1250 results are returned. Perhaps I could be smarter about the results, right now I am just querying  for 'textbox.value%' in the database.

Scriptaculous also seems to work kind of quirky in IE, but works great in FF and Safari.
0
Comment
Question by:dignified
4 Comments
 
LVL 11

Accepted Solution

by:
raj3060 earned 125 total points
ID: 20419575
get the number of results first,  if you get too many results then don't apply autocomplete. This would reduce the execution time. Which would be the case when user is entering only one character, for two or more characters search would be more refined and you would get less results.
0
 

Author Comment

by:dignified
ID: 20562378
It is tough though because I am going by dialing codes so if I enter "1", the most common one for the United States, if I query for '1%' I get about 1200 results. I can't really wait for more to be entered, because 1 is pretty common.

Are there any other scripts out there besides scriptaculous?
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20953159
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now