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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:44:35+00:00 2026-05-17T22:44:35+00:00

I was wondering if there is a way to make a radio button select

  • 0

I was wondering if there is a way to make a radio button select another radio buttons data. For example, a “select all” radio button, would select another radio button. Or In the event of a survey where a question could be rated from 0 to 5, when “select all as 0” is selected, all the following radio buttons are selected at “0”.
I feel like there is an easy way of doing this, but I have no Idea what it would be (possibly javascript?) Thanks!

  • 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-17T22:44:36+00:00Added an answer on May 17, 2026 at 10:44 pm

    HTML

    <button type='button' onclick='selectAs0()'>Select All As 0</button>
    
    <input type='radio' name='setA' value='0' /> 0
    <input type='radio' name='setA' value='1' /> 1
    
    <input type='radio' name='setB' value='0' /> 0
    <input type='radio' name='setB' value='1' /> 1
    

    JS

    function selectAs0() {
      var ALL = document.getElementsByTagName("INPUT");
    
      for(var x = 0; x< ALL.length;x++) {
        if(ALL[x].type=='radio' && ALL[x].value == 0) {
          ALL[x].checked = true;
        }
      }
    }
    

    Untested at this point but should work-ish.

    // EDIT

    If you’re determined to use a radio button to actuate the function, the same concept will
    work…

    <input type='radio' onclick='selectAs0()' />
    

    …but you’ll have to add extra code to de-check the radio once it’s already selected.

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

Sidebar

Related Questions

I am wondering is there any other way to make a non-synchronized data structure
was wondering if there is a way to make superfish using jquery ui theme
I'm wondering if there's any way to make the text of an unordered list
I am wondering if there is some way to make an box have the
I was wondering if there was a way to make Android games in libgdx
I was wondering, is there a way to make a kind of one to
I'm just wondering is there a way to make the 'null' that is outputted
I was wondering if there is any way to make a copy of an
I am wondering if there is some way to make an iPhone application where
I was wondering if there was a way to make OpenGL ES render a

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.