Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3724704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T06:44:16+00:00 2026-05-19T06:44:16+00:00

Auto-complete seems to be a standard tool on web sites. Surprisingly, it is hard

  • 0

Auto-complete seems to be a standard tool on web sites. Surprisingly, it is hard to find a ready-to-use solution in Internet. I have some basic requirements to the code:

  1. I want to see only those words that start from the typed symbols (not those words that contain the types substring somewhere in the middle).
  2. I want to be able to set the maximal number of words in the drop-dawn menu.
  3. I want to be able to set style of the drop-dawn menu (color of the background, color of typed substring, color of rest of the word).
  4. Suggested words has to be requested from the web-server (I do not want to load all possible values at once, since it is going to be a huge array of values).
  5. There is just one example-file that I can just copy to my server and see that it works (then I can start to modify it to put there my content and set my style).

Do I want to much or there is something in the Internet?

ADDED:

As the first answer suggest, there is a solution provided by JQuery. I have managed to make it work. However it was not trivial, since the code is given out of the context. First it is not clear where I need to put this code (head?, body?). Then if I put it in the body it start to work only after I put this stuff to the head:

<link rel="stylesheet" href="/css/base.css" type="text/css" media="all" /> 
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" type="text/css" media="all" /> 
<link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" />       
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" type="text/javascript"></script> 
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script> 
<script src="/js/demos.js" type="text/javascript"></script> 
<script src="/themeroller/themeswitchertool/" type="text/javascript"></script> 

It was not written on the page that I need to use this lines to make the code work. I copied this lines from the head of the page that provide the example of the auto-complete.

Moreover, I still have the problem since the auto-complete search all the words that contain the typed substring (and I need the words that start from the typed substring).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T06:44:17+00:00Added an answer on May 19, 2026 at 6:44 am

    How about this demo:

    http://jsbin.com/oniji4

    Moreover, I still have the problem since the auto-complete search all the words that contain the typed substring (and I need the words that start from the typed substring).

    For this you need to implement your own implementation of the source parameter. Documentation says that you can specify the following as the source:

    • an Array with local data
    • a String, specifying a URL
    • a Callback

    Now that you say that you want the suggested words to come from a server, you should use the second option (specify a URL for JSONP). That allows you to handle “I need the words that start from the typed substring” part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have declared a protocol, everything seems to work fine, even Xcode auto-complete the
I have installed Eclipse Indigo and the auto-complete feature is working normally in the
I have a auto-complete textbox in which the user makes a selection. From here
I have an array of 16 squares and I would like to auto complete
I'm trying to use an auto-complete widget that gets its data from a remote
I'm following http://railscasts.com/episodes/102-auto-complete-association Everything seems fine. I'm trying to create an invoice and also
It seems that eclipse has always had some flaky auto-complete functionality. I'm now using
Im revising my auto-complete style search script. The site has 2 categories... movies and
I'm using auto-complete and yasnippet in Emacs and I am confused by their settings.
I'm trying to create an auto-complete function for the ICSharpCode.TextEditor. But the fileTabs_KeyDown doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.