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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:44:48+00:00 2026-05-26T04:44:48+00:00

How to detect which radio button was clicked in h:selectOneRadio using javascript or maybe

  • 0

How to detect which radio button was clicked in h:selectOneRadio using javascript or maybe jquery?

I can already do this using valueChangeListener and a4j:support from managed bean.
What i want is not to go to the server and just use jquery just for performance, because sometimes
it takes time before the server response comes back.

What i want is when a radio button was clicked it will disable some of my components.

Here is the code.

<h:selectOneRadio id="isPrivate" valueChangeListener="#{someBean.changeRadio}">
                    <a4j:support event="onchange" reRender="sp" />            
                    <f:selectItem id="isPrivate0" itemLabel="No" itemValue="false"/>
                    <f:selectItem id="isPrivate1" itemLabel="Yes" itemValue="true"/>         
                </h:selectOneRadio>

Thanks in advanced.
🙂

  • 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-05-26T04:44:49+00:00Added an answer on May 26, 2026 at 4:44 am

    It’d better attach change event to each radio button in the list on document’s onload.

    $(function()
    {
        $('table[id$="isPrivate"] input:radio',this).each(function (){ 
                    $(this).change(function (event) { 
    
                    //do disabling here
                    //$(this).val() - will return the value of radiobutton
                    });
        }); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you detect which form input has focus using JavaScript or jQuery? From
In javascript, how can we detect which row of the table is clicked? At
How can i detect which browser type the client is using. I have a
Can anyone help me detect which version of Windows the user may be using?
Android: guys i want to detect which button is clicked by the user. The
How to detect which dynamic button is clicked? Note: The #dCalc Element is added
How can I detect which request type was used (GET, POST, PUT or DELETE)
How can I detect which CPU is being used at runtime ? The c++
Is this the proper way to detect which device a user is running? NSString
Possible Duplicate: jquery trigger - ‘change’ function I have a radio button set called

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.