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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:52:09+00:00 2026-06-07T18:52:09+00:00

I want the AutoComplete to behave like this. When the user is typing something

  • 0

I want the AutoComplete to behave like this.

When the user is typing something in the textbox nothing should be happen..
Autocomplete suggestion list should be appear only when the user has finished writing
in the textbox and press the enter key..

Any idea how to do this.. Or where to change the code..

  • 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-07T18:52:11+00:00Added an answer on June 7, 2026 at 6:52 pm

    STEP : 1

    Change the jquery.ui.autocomplete.js file to accept the enter key by changing the method having signature as following

    .bind(“keydown.autocomplete”, function (event)

    and change it’s following code

                    case keyCode.ENTER:
                    case keyCode.NUMPAD_ENTER:
                        // when menu is open and has focus
                        if (self.menu.active) {
                            // #6055 - Opera still allows the keypress to occur
                            // which causes forms to submit
                            suppressKeyPress = true;
                            event.preventDefault();
                        }
                        //passthrough - ENTER and TAB both select the current element
    

    To

                    case keyCode.ENTER:
                    case keyCode.NUMPAD_ENTER:
                        // when menu is open and has focus
                        if (self.menu.active) {
                            // #6055 - Opera still allows the keypress to occur
                            // which causes forms to submit
                            suppressKeyPress = true;
                            event.preventDefault();
                        }
                        else {
    
                            clearTimeout(self.searching);
                            self.searching = setTimeout(function () {
                                // only search if the value has changed
    
                                self.selectedItem = null;
                                self.search(null, event);
    
                            }, self.options.delay);
    
                        }
                        //passthrough - ENTER and TAB both select the current element
    

    STEP : 2
    Changing autocomplete binding as

     $('.SearchAddresses').autocomplete({
      // Your bind code by setting required parameters
    
      search: function (event, ui) {
                    var key = CheckBrowser(event);
                    if (key == 13)
                        return true;
                    else
                        return false;
                }
       });
    
    
     function CheckBrowser(e) {
            if (window.event)
                key = window.event.keyCode;     //IE
            else
                key = e.which;     //firefox
            return key;
        }
    

    SETP : 3
    If you are using it inside the asp.net form control

    then include it as well.

     $(document).ready(function () {
    
            $("form").keypress(function (e) {
                var key = CheckBrowser(e);
                if (key == 13) {
                    e.preventDefault();
                    return false;
                }
                else {
                    return true;
                }
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to clear the textbox having Jquery Autocomplete once the user has made
i'm using this plugin for autocomplete http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete i want that when the user clicks
i want to make autocomplete for many text input field... but with this autocomplete
I want someone to type words in the console, and autocomplete from a list
I'm developing a web application and I want the user to see autocomplete results
I want my EditText should work as AutoComplete , for that I write in
I want to use AutoCompleteExtender for autocomplete in TextBox. But not getting the results.
Ok, so I want an autocomplete dropdown with linkbuttons as selections. So, the user
I'm trying to implement an autocomplete field. I want this autocomplete to retrieve the
Q: I want to make autocomplete facility like the one exists in yahoo mail

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.