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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:20:52+00:00 2026-06-12T23:20:52+00:00

I am sorry if this is a duplicate, but I cannot find the answer

  • 0

I am sorry if this is a duplicate, but I cannot find the answer to my question. Please send me a link if you know where it has already been answered.

I am using jquery to bind a function to the onblur event of a textbox.
The objective is to trigger a postback only when the focus leaves the textboxes in the tblUserDetails table.
When a textbox loses focus:

  • In IE, the new focused element is the new selected textbox.
  • In Chrome, document gets focused in between the two textboxes, so that $(document.activeElement) never points to the newly selected textbox.

Here is my code, which works in IE, but not in Chrome:

SaveNetworkDetails: function () {

    // Trigger the blur event when one of the textboxes loses focus
    $("[id$=tblUserDetails]").find('input[id*="txt"]').blur(function (e) {

        // Check if the new focused element is among the textboxes
        if ($(document.activeElement).parents("[id$=tblUserDetails]").length == 0) {
            // Trigger postback
        }
    });
}

How can I find the newly selected textbox in Chrome in the function bound to the blur event?

Regards,

Gilles

  • 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-12T23:20:53+00:00Added an answer on June 12, 2026 at 11:20 pm

    A small misconception here: .blur() does not trigger the blur event, it binds a function to the blur event, meaning you set a function that will be triggered when the blur occurs.

    Perhaps that misconception is the root cause of your issue.

    Update

    I’ve re-read the question and now I see what you are trying to achieve. Although your text leads one to think you are programatically triggering the blur, your issue is the fact that, in chrome, the document gets the temporary focus when a control is left.

    Instead of triggering the postback on the first input’s blur, you should trigger the postback on the next input’s focus. By what I see in your code, this change would not matter much, but would solve your issue.

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

Sidebar

Related Questions

I'm sorry if this questions has been asked before, but I couldn't find an
Sorry if this is duplicate,I would think it would be but couldn't find anything.
Sorry if this is a duplicate question...I've searched around and found similar advice but
I'm sorry if this is a duplicate, but the question search terms are pretty
Sorry if this is a duplicate - couldn't find an answer by searching. How
Possible Duplicate: Explicitly assigning values to a 2D Array? sorry if this has been
Sorry, if this is a duplicate. Please point me to the appropriate question if
Sorry, I know this is probably a duplicate but having searched for 'python regular
Hi sorry if this is a duplicate but I don't know what to search.
I know this is duplicate but sorry as solution given on other post seems

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.