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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:09:14+00:00 2026-05-20T17:09:14+00:00

I am using jQuery v1.4.4 and jQuery UI 1.8.10. I have an AutoComplete on

  • 0

I am using jQuery v1.4.4 and jQuery UI 1.8.10. I have an AutoComplete on a text field which works fine when the user types in some text, the results are displayed. At this point the user can click outside of the results or press ‘Esc’ to close the result list.

If I use the Search Method to programmatically start a search, the results are shown as well, but the ESC button or clicking outside of the result box does not close the results.

What am I missing here?

Html:

<input id="txtTest" />
<input type="button" id="btnGo" value="Go" />

JavaScript:

var availableTags = [
        "ActionScript",
        "Java",
        "Java 6",
        "JavaScript",
        "Scheme"
    ];

$("#txtTest").autocomplete({ source: availableTags });
$("#btnGo").click(function() { $("#txtTest").autocomplete("search", "j"); })
  • 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-20T17:09:15+00:00Added an answer on May 20, 2026 at 5:09 pm

    The issue is that the ESC/click to close only registers when the input has focus. What you could do is call focus on the autocomplete after programtically opening it:

    $("#btnGo").click(function() { $("#txtTest").autocomplete("search", "j").focus(); })
    

    Here is a working example:

    http://jsfiddle.net/magicaj/NtPnm/1/

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

Sidebar

Related Questions

I have some tabs using jQuery UI which work just fine, but I want
I have a site with a form with autocomplete using jquery. It works fine,
I am using the jQuery autocomplete plugin and have wired up an input field
using jquery I have a autocomplete text box like the combobox example on the
I'm using jQuery UI Autocomplete 1.8.1 with Jquery 1.4.2 and I have this issue.
I'm using 'rails3-jquery-autocomplete' gem, but it doesn't have multi column search, but there is
Hey right now I'm using jQuery and I have some global variables to hold
I'm using Jorn Zaefferer's Autocomplete query plugin, http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ I have options set so it
I have an autocomplete field which I would like to augment by providing a
I have a test server with a page using jquery autocomplete. The autocomplete feature

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.