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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:18:18+00:00 2026-05-11T22:18:18+00:00

I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes

  • 0

I am trying to use jquery autocomplete plugin, I want it to suggest ItemCodes as user types…

The problem is its not showing autocomplete box/frame/….

Just to make sure webmethod returns data on every keyup event, I assigned data to a div element, and it works as it should.

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        var strItmCodes;

        $("#txtItmCode").keyup(function() {
            var search;
            search = $("#txtItmCode").val();

            if (search.length > 0) {
                $.ajax({
                    type: "POST",
                    url: "Journal.aspx/loadData",
                    contentType: "application/json; charset=utf-8",
                    data: "{'Like':'" + $('#txtItmCode').val() + "'}",
                    dataType: "json",
                    success: function(retval) {
                        strItmCodes = retval.d.split("|");

                        $("#txtItmCode").autocomplete(strItmCodes);
                        $("#suggest").html(retval.d); //elemet 'suggest' is a div
                    }
                });
            }
        });
    });
</script>

Modified

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        //$("#txtItmCode").autocomplete({url: "Journal.aspx/loadData" });

        $("#txtItmCode").keyup(function() {
            $("#txtItmCode").autocomplete({url: "Journal.aspx/loadData" });
        });
    });
</script>
  • 1 1 Answer
  • 3 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-11T22:18:18+00:00Added an answer on May 11, 2026 at 10:18 pm

    I think you should enable the autocomplete plugin before the first keypress, then the plugin will add the event handlers.

    Assuming you use the original autocomplete plugin:

    $("#txtItmCode").autocomplete({url: "Journal.aspx/loadData"});
    

    And make sure you service can reply to the GET request formatted by the plugin.

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

Sidebar

Related Questions

I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete ). My
I'm really struggling trying to use the jQuery UI autocomplete plugin. I've had a
I'm trying to use the official jQuery autocomplete plugin with an ASMX web service
I´m trying to use the JQuery UI Autocomplete plugin ( click to see the
I am trying to use jquery autocomplete plugin in my application. It works well
I am trying to use jQuery's fancy autocomplete function but I have a problem
I'm trying to use the jQuery autocomplete plugin. I have an array of IDs
I am trying to use jQuery Autocomplete Plugin in my PHP web application. I
I am trying to use the jquery autocomplete plugin but am having trouble getting
Im currently trying to use a jQuery plugin: jQuery Autocomplete Tokenizer Now after posting

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.