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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:06:14+00:00 2026-06-17T06:06:14+00:00

I want to send an error message to the server when a jquery event

  • 0

I want to send an error message to the server when a jquery event is not supported by the browser.
For example blur() event will not get triggered for radio button in chrome browser.
How can i identify this and send error message to the server?

UPDATE

I tried Modernizr.hasEvent on radio button for blur event.Eventhough it returns true blur event is not getting called in google chrome.Try the below jsfiddle in google chrome.

html

<input type = 'radio' id = 'r1' name = 'r1' value = 'R1'>R1</input>
<input type = 'radio' id = 'r2' name = 'r1' Value = 'R2'>R2</input>
<input type = 'text' id = 'r3'  Value = ''></input>

js

alert(Modernizr.hasEvent('blur',$('#r1')));
alert(Modernizr.hasEvent('blur',$('#r3')));
$('#r1').blur(function(){
  alert('blur is called')
});
$('#r3').blur(function(){
  alert('blur is called')
});

http://jsfiddle.net/nUN8k/23/

  • 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-17T06:06:16+00:00Added an answer on June 17, 2026 at 6:06 am

    The problem with chrome is not it doesn’t support blur on radio buttons. The problem is that the radio button never gets focused in the first place.

    Try this in your fiddle:

    Test 1:

    • Click R1
    • Click R2
    • Click away

    The event doesn’t fire, but no focus (an orange border) is indicated either.

    Test 2:

    • Click R3
    • Press Shift+tab (and dismiss the blur alert). R2 should be focused but not selected.
    • Press the left key. R1 gets selected and focused.
    • Click away. R1 registers a blur event.

    So, the event is supported in Chrome – only it doesn’t fire when you expect.

    The workaround is to focus the radio button manually when it is clicked so that you get cross-browser consistent (not just valid) behavior:

    $("input").click(function(){
        $(this).focus()
    })
    

    http://jsfiddle.net/nUN8k/24/

    The test – I haven’t checked if it works and I don’t know if it’s implemented in modernizr – would be to click a hidden input and see if it get focused. However, there could be some false positives (mistaken for Don’t focus hidden elements etc.) …

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

Sidebar

Related Questions

I want to send a message from the server to the client and found
I want to be able to send a friendly error message to my user
I am using log4net. When Application gives an error, I want to send e-mail
Hello Sir i want send list of data to php server i use following
I am using Servlet as controller and jquery to send request to server. Following
I want to send unsolicited messages over an SSL connection. Meaning that the server
What i want to do: Simply send some data (json for example), to a
this below code could'nt send data to other server. i want to send aaa-bbb-ccc
I want to use wamp as my development server and I'm trying to send
I want to send file chunks to server async to server (MVC action in

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.