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

  • SEARCH
  • Home
  • 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 6912173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:03:31+00:00 2026-05-27T09:03:31+00:00

Suppose there are tags in the database table, or in a text file or

  • 0

Suppose there are tags in the database table, or in a text file or in a xml file.

Now when an user type something in the textbox, it will call the jquery ajax autocomplete searching function like we do for stackoverflow tags adding.

How can i do this with jquery ajax? Can someone post complete code with example?

I have read this, http://docs.jquery.com/Plugins/Autocomplete, but could not understand how to implement that.

  • 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-27T09:03:32+00:00Added an answer on May 27, 2026 at 9:03 am

    I would recommend you using the jQuery UI AutoComplete. The documentation provides a full example of how to set it up with AJAX.

    You put an input field:

    <input id="tags" name="tags" />
    

    and then apply the plugin:

    $(function() {
        $('#tags').autocomplete({
            source: '/tags',
            minLength: 2
        });
    });
    

    This will invoke the /tags server side script and pass it the term query string parameter that will contain the input value. For example: /tags?term=asp. The server will then use the asp value to look in the database and respond with a JSON of the following form:

    [ { "id": "1", "label": "label 1", "value": "value 1" }, 
      { "id": "2", "label": "label 2", "value": "value 2" },
      { "id": "3", "label": "label 3", "value": "value 3" },
      ...
    ]
    

    which will represent an array of objects that match the search criteria and which will be shown in the dropdown.

    Obviously the implementation of the server side script will greatly depend on the server side language you are using, the database access technology, …

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

Sidebar

Related Questions

Suppose there is an image_url column in database. I want the user to choose
Suppose there is such HTML tags: ​<span> <span id='s1'>Text 1</span> <span id='s2'>Text 2</span> </span>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
..I suppose because the html has script tags :-/ <script type=text/javascript> $(document).ready(function() { $('.ad_slot').html('<scr'+'ipt
Suppose there is a table A which has a column AccessRights which is multivalued(
Suppose I have a tags table with two columns: tagid and contentid . Each
Suppose I have a database which contains blog posts which have tags and I
Suppose I several tags, text input, radios, etc referencing one instance object. I would
Suppose there are only two type of model objects. Tag Article Article can have
I have a project that will require merging multiple snippets of text together. There
Suppose there are two scripts Requester.php and Provider.php, and Requester requires processing from Provider

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.