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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:42:47+00:00 2026-05-24T11:42:47+00:00

Below is the code for my autocomplete. The problem is that it mostly works.

  • 0

Below is the code for my autocomplete. The problem is that it mostly works. Say I have a bunch of results that are like test1, test2, test3, etc. If I type “t” they popup, when I put an e in “te” they disappear. Then if I put in the “s” it narrows it down further. it’s not always the second letter either. It just seems sporadic. Please help. I have confirmed the data coming back is solid, so it’s nothing on the backend.

        //Server autocomplete
        $("#txtSearchServer").keyup(function (event) {
            $.ajax({
                url: 'edit/EditService.svc/SearchServers',
                type: 'GET',
                data: { 'term': $("#txtSearchServer").val() },
                dataType: 'json',
                success: function (data) {
                    var listServers = [];
                    $.map(data.d, function (item) {
                        ///working here to do server autocomplete!!!!!!!
                        listServers.push(item.ServerName);
                        $("#txtSearchServer").autocomplete({
                            source: listServers
                        });
                    });
                },
                error: function (a, b, c) {
                    $('.Toast').html('Error Retreiving Servers for autocomplete!');
                }
            });
        });
  • 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-24T11:42:49+00:00Added an answer on May 24, 2026 at 11:42 am

    Looking at your code you are doing asp.net

    SO this should work for you:

    function AutocompleteJSONParse(data) {
        var rows = new Array();
        var rowData = null;
        for (var i = 0, dataLength = data.length; i < dataLength; i++) {
            rowData = data[i];
            rows[i] = {
                value: rowData.ServerName,
                label: rowData.ServerName
            };
        }
        return rows;
    };
    $("#txtSearchServer").autocomplete({
        source: function(request, response) {
            var pString = '{"term":"' + request.term + '"}';
            $.ajax({
                url: 'edit/EditService.svc/SearchServers',
                type: 'GET',
                dataType: "jsond",
                type: "POST",
                contentType: "application/json",
                converters: {
                    "json jsond": function(msg) {
                        return msg.hasOwnProperty('d') ? msg.d : msg;
                    }
                },
                data: pString,
                success: function(data) {
                    var rows = AutocompleteJSONParse(data);
                    response(rows);
                }
            });
        },
        error: function(a, b, c) {
            $('.Toast').html('Error Retreiving Servers for autocomplete!');
        },
        minLength: 2,
        delay: 1000
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I placed all code below. My page works like that Page's first scene When
The below code is very simple. I have a jQuery autocomplete bound to an
I have the below code that does not seem to work at all :(
I have an autocomplete text box that users can type an item code into
Below are my code for jQuery UI, the problem I am facing is that
My below code works fine and is used to populate a <select> item with
The below code works when there are a few element in the To list
The below code seems like it should work; however, the blob in the database
I have the below code in stdafx.h. using namespace std; typedef struct { DWORD
In the code below, I have the same function on three different events (focus,

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.