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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:33:27+00:00 2026-06-09T06:33:27+00:00

I have realised that for my autocomplete I don’t really need to work with

  • 0

I have realised that for my autocomplete I don’t really need to work with an ajax call(I have seen many examples that worked with ajax call), I can simply work with the following:

$(document).ready(function () {
    var myData = jQuery.parseJSON(getProjects());
    $("#inputSearchProject.ClientID").autocomplete(myData);
});   

Where, getProjects() is a small script and TheProjects is a property that it is initialized with the suggestion JSON string for my autocomplete.

<script type="text/javascript">
    function getProjects() {
        return '<%= this.TheProjects %>';
    }
</script>

When debugging I have noticed that myData receives the values, but I still get an runtime error : “Microsoft JScript runtime error: Object doesn’t support property or method ‘autocomplete'” – even though I have searched, I haven’t found the answer to this.

EDIT: I have solved the error (it was a silly one:) novice kind of mistake)

I have changed my code into:

$(document).ready(function () {
     var myData = jQuery.parseJSON(getProjects());
     $("[id$='txtSearchProject']").keypress(function () 
   {
     $("[id$='txtSearchProject']").autocomplete(myData);
  })
 });

because I want autocomplete to be started only when it detects I have written something in the input control. Do you have any suggestions why it doesn’t work?


Thank you all for your suggestions. I have solved my problem, but only with the tips I have received from you. I am going to put here my small piece of code, maybe someone with a similar question will find it useful in the future:

$(document).ready(function () {
 var myData = jQuery.parseJSON(getProjects());
 $("[id$='txtSearchProject']").keypress(function () 
  {
       $("[id$='txtSearchProject']").autocomplete({ source: myData});
  })
});

//I have added instead of .autocomplete(my data) —>.autocomplete({ source: myData})

  • 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-06-09T06:33:29+00:00Added an answer on June 9, 2026 at 6:33 am

    You are missing the jQuery UI script file.

    Get it here:

    http://jqueryui.com/download

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

Sidebar

Related Questions

I just built a website and have realised that I need to have a
I have realised after making about 20 tables that I need to user utf8_unicode
Been working on some code streamlining and have realised that it would be really
I have made this game for Mac OS, but I realised that i need
I have a fairly standard OLTP normalised database and I have realised that I
EDIT 2: I have just realised that my HTML is only displaying the artist
I've creating a Java Swing application and I realized that I have many many
<%= Html.EditorFor(product => product.Name) %> I need the generated output to have autocomplete=off attribute
I have soft real-time .NET application run on W2008R2. I just realised that I
I have recently realised that all of my media files that have special chars

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.