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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:03:43+00:00 2026-06-04T12:03:43+00:00

I have an input and on blur I want to save the value. The

  • 0

I have an input and on blur I want to save the value.
The problem is that I have autocomplete on and when the users clicks on a suggestion from the autocomplete list the blur is triggered.

For example: the users enters “iP” in the input and then clicks “iPhone” from the autocomplete list. In this caste both “iP” and “iPhone” values are stored (“iP” store triggered by blur and “iPhone” store triggered by autocomplete click).

I was thinking about checking if the blur action was triggered by a click on the autocomplete list.

$('input').blur(function(e){
  if(e.IsClickOnAutocomplete)
     return;
  else save_value;
});

So, how can I check in which way the blur was triggered?

EDIT
Here, a jsFiddle that shows something simillar to my problem http://jsfiddle.net/mkp8m/1

  • 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-04T12:03:45+00:00Added an answer on June 4, 2026 at 12:03 pm

    Ok, after making clear what autocomplete you mean, here is the solution.

    Use change event of autocomplete plugin:

    change: function(event, ui) {
        // save(this.value);
    }
    

    DEMO: http://jsfiddle.net/mkp8m/2/

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

Sidebar

Related Questions

I have two events that I want to observe on an object, input.blur(function(event) {
I have a standard text input that has a blur event. The blur event
I have a simple form that I want to validate using blur if the
basically i want to hold a parameter that retrieve value from $.post() call like
I have an input field, where I try to make autocomplete suggestion. Code looks
I want to observe other field blur event. Suppose I have: <input type=text name=age
i have: <input type=text /> and $('input').blur(function(){ alert('stay focused!'); }); I want to prevent
I have the following snippet of code: $('input#teamName').live('blur', function() { var value = $(this).val();
I have text input element and an event is fired on blur event and
I have some code bound to the blur() event in jQuery: $('input[type=text]').blur(function () {

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.