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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:38:58+00:00 2026-05-12T23:38:58+00:00

I asked a similar question previously, but it was so vague that I couldn’t

  • 0

I asked a similar question previously, but it was so vague that I couldn’t possibly have gotten the answer I wanted.

Basically, I want a user to be able to select from multiple options and have various bits of information appear based on the selections.

For example:

"How old is your computer?" 
Options: [x]One Year [ ] Two Years [ ] Three Years

Output: "Your computer is One year old"

I want that functionality to expand over multiple separate checkboxes and radioboxes…?

Is this possible?

EDIT:

Its for a hardware upgrade recommendation system that takes in to account your current system.

“Based on your current system, you need to replace your graphics card and purchase additional RAM”

Which could use factors like
“How old is your computer?”, “How much RAM does your computer have”, “What directX version is your graphics card” or something like that.

  • 1 1 Answer
  • 2 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-12T23:38:59+00:00Added an answer on May 12, 2026 at 11:38 pm

    You’d need a way to associate each checkbox with the information you wanted to show. You could for example combine the name and value to get an ID to show, assuming the values are characters that are valid in an ID:

    <input type="radio" name="age" value="1" /> One year
    <input type="radio" name="age" value="2" /> Two years
    <input type="radio" name="age" value="3" /> Three years
    
    <div id="age-1"> Your computer is awesome!! </div>
    <div id="age-2"> Your computer is so-so </div>
    <div id="age-3"> Your computer sucks </div>
    

    Now you just need a bit of script to tie them together:

    function showElementsForInputs(inputs) {
    
        // Set the visibility of each element according to whether the corresponding
        // input is checked or not
        //
        function update() {
            for (var i= inputs.length; i-->0;) {
                var input= inputs[i];
                var element= document.getElementById(inputs[i].name+'-'+inputs[i].value);
                element.style.display= input.checked? 'block' : 'none';
            }
        }
    
        // Set the visibility at the beginning and also when any of the inputs are
        // clicked. (nb. use onclick not onchanged for better responsiveness in IE)
        //
        for (var i= inputs.length; i-->0;)
            inputs[i].onclick= update;
        update();
    
    }
    
    showElementsForInputs(document.getElementById('formid').elements.age);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked a similar question previously but it was never resolved so here
I have asked a similar question previously, but posting a new one as I
I have a problem similar to this question which was previously asked but my
Ok, I have previously asked a similar question to this but it was voted
I asked a similar question about this previously, but I did not specify that
I asked a similar question yesterday but I included some code that basically took
I have asked a similar question previously, but 1. no one answered and 2.
Somebody asked similar question not long ago. But nobody answered comprehensively. Assume I have:
I asked a similar question yesterday, but recognize that i need to rephase it
A similar question was previously asked, but none of the answers really provided what

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.