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 7129317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:13:48+00:00 2026-05-28T11:13:48+00:00

i will like to populate a Jquery autocomplete search with database items… rather than

  • 0

i will like to populate a Jquery autocomplete search with database items… rather than using an “names” with a list of names assigned to it, can i search from my database source ?

$(function() {
    var names = [ "sandy", "ruga", "malicka" ];

    var normalize = function( term ) {
        var ret = "";
        for ( var i = 0; i < term.length; i++ ) {
            ret += accentMap[ term.charAt(i) ] || term.charAt(i);
        }
        return ret;
    };

    $( "#developer" ).autocomplete({
        source: function( request, response ) {
            var matcher = new RegExp( $.ui.autocomplete.escapeRegex( request.term ), "i" );
            response( $.grep( names, function( value ) {
                value = value.label || value.value || value;
                return matcher.test( value ) || matcher.test( normalize( value ) );
            }) );
        }
    });
});
  • 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-28T11:13:49+00:00Added an answer on May 28, 2026 at 11:13 am

    Check this example from jQuery UI auto-complete: http://jqueryui.com/demos/autocomplete/#multiple-remote

    The basic idea goes like:

    ...
    source: function( request, response ) {
        $.getJSON( "yourserver/data.php", {...params...}, response );
    },
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone used jQuery to populate an autocomplete list on a textbox using ASP.NET
I am using jQuery Ui Autocomplete 1.8.14 and I would like to do two
I am using jquery to populate dropdownlist, the codes are like below: var myOptions
I'm using JQuery UI's Autocomplete to load a list of users into a custom
I'm using ajax to populate some thumbnails for search results, and I'd like to
By default the jQuery U Autocomplete produces a list of results, upon clicking on
Using jquery 1.7.1, I'm using json to populate the dropdown. The code works just
Using jQuery/jQueryUI I want to populate a form using this HTML/JS show below. The
I am using Ruby on Rails 3.0.7 and jQuery 1.6.1. I would like to
I populate my tabs contents using AJAX calls with the tabs widget from jQuery

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.