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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:15:33+00:00 2026-06-14T20:15:33+00:00

Possible Duplicate: jQuery AutoComplete Trigger Change Event I am using jQuery UI v1.9 and

  • 0

Possible Duplicate:
jQuery AutoComplete Trigger Change Event

I am using jQuery UI v1.9 and I successfully implemented the jQuery UI Autocomplete widget. I would like to know if it is possible to trigger / bind a jQuery UI event and, if so, how to make that. That is, for example, if I have

$('#autocomplete_field" %>').autocomplete({
  change: function (event, ui) {
    // Make something...
  },
  minLength: 2,
  ...
});

is it possible to run the jQuery UI change event by binding that to a keypress event?


Note: I tried

$('#autocomplete_field').bind('keypress', function(event) {
    $('#autocomplete_field').autocomplete('option', 'change').call();
});

but I get the following error (from the Firebug console):

TypeError: elem.nodeName is undefined
...ks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase(...
  • 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-14T20:15:33+00:00Added an answer on June 14, 2026 at 8:15 pm

    this will cover autocomplete for the textbox:

      $(".autoCompleteTxtBox").autocomplete({
                     source: "www.url.com/Source",
                     select: function (event, ui) {
                         //something to do when user selects from dropdown
                     }
                 });
    
    
    
     $(document).on('keyup, keydown, change', '.selectorClass', function(event){    
           //I'm not sure what you need ui for exactly
          var pos = $(this).position(); // gets position of .selectorClass
          var val = $(this).val(); // gets current value of .selectorClass
          var width = $(this).width(); // gets width
         // if there are multiple '.selectorClass' - $(this) is the one that fired event
       });
    

    Does that give you an idea of how $(this) is used ?

    a little redundant to handle events in 2 spots for same textbox , but if that’s what you want – this will have a functioning autocomplete , and another place for handeling everytime the textbox is change no matter how it was changed.

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

Sidebar

Related Questions

Possible Duplicate: jQuery: more than one handler for same event I am using a
Possible Duplicate: jQuery event to trigger action when a div is made visible How
Possible Duplicate: jQuery autocomplete UI- I'd like it to start the search onfocus without
Possible Duplicate: jQuery ui dialog change title after load-callback I like to change the
Possible Duplicate: jQuery change input type How to replace input[type=submit] to input[type=text] using jQuery?
Possible Duplicate: jQuery/Javascript collision detection What would be the best way using preferably using
Possible Duplicate: Bind multiple events to jQuery 'live' method I have the following function:
Possible Duplicate: Find text string using jQuery? How do you find a text string
Possible Duplicate: jQuery voting system I've been using this tutorial to create a voting
Possible Duplicate: JQuery .each() backwards I am using this code to show each div

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.