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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:34:30+00:00 2026-06-02T08:34:30+00:00

I am working on a site called earthquake damage map . It is almost

  • 0

I am working on a site called earthquake damage map. It is almost finished, however I have a problem with the autocomplete function. It works fine with the search button, but I want to get rid of the search button altogether. It should query the results when I click on a result in the list but instead displays all the results appearing in the list.

    <input type="text" id="search-string4" placeholder="Search by Earthquake" class="tb11" onclick="focus" oninput="doQuery()" onchange="doQuery()"> 

As you can see it queries the results as I type which is good but doesn’t display properly when a result is clicked in the list.

Any help would be much appreciated.

  • 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-02T08:34:32+00:00Added an answer on June 2, 2026 at 8:34 am

    Whatever code you are calling on clicking the search button, you can move that code into select event of autocomplete as follows:

    $( "#search-string4" ).autocomplete({
       select: function(event, ui) {
            doQuery();
       }
    });
    

    from jqueryui website,

    select event is Triggered when an item is selected from the menu; ui.item refers to the selected item. The default action of select is to replace the text field’s value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing

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

Sidebar

Related Questions

I am working on a wordpress site, and I have downloaded a plugin called
Hello I have issues with jquery on my site. It was working fine till
I have a MVC site with AD authorization. This is all working fine. I
I have to make some mods to an existing (and working) magento site. So
I have been working on a Rails template recently called BaseApp2. You can see
I am working on a google Map Api using fusion. I have multiple search
at the site I'm working on euroworker.no , we have a videolightbox (click se
For my site I have a directory called /test/ . I want to rewrite
I have a project that I've been working on called system that I set
I'm having a strange problem here. I'm moving a (working) site to a new

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.