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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:36:18+00:00 2026-06-18T00:36:18+00:00

Does anyone know how to sum the total of the values. And I would

  • 0

Does anyone know how to sum the total of the values. And I would like to multiply the total with 1072. I tried it a littlebit. But that didn’t work out very well..

So I would like a javascript code where the total of the 4 values that are marked will be calculated.

   <html>   
    <head>
        <h2>Inboedelwaardemeter</h2>
        <script type="text/javascript">
            function sumCheckedRadioButtons() {
                  var sum = 0;
                  $('input[type=radio]:checked').each(function(i, el) {
                    sum += Number($(el).val());
                  });
                  return sum;
                }
                $('#show_sum').on('click', function() {
                    alert(sumCheckedRadioButtons());
                });
        </script>
    </head> 
    <body>
        <br>
        <b> Leeftijd hoofdkostwinner:</b>
        <form name="mijnForm1">
        <br>
            <input type="radio" id="getal1" name="leeftijd"
                value="22" checked> 35 jaar en jonger
              <br>    
            <input type="radio" id="getal2" name="leeftijd"
                value="29"> 36 t/m 50 jaar
              <br>
            <input type="radio" id="getal3" name="leeftijd"
                value="38"> 51 jaar en ouder
              <br>
            <br>
        <b> Samenstelling huishouden:</b>
        <br>
        <form name="mijnForm2">
            <input type="radio" id="getal4" name="huishouden"
                value="22" checked> Alleenstaande
              <br>    
            <input type="radio" id="getal5" name="huishouden"
                value="29"> Echtpaar / Samenwonende
              <br>
              <br>  
        <b> Netto maandinkomen hoofdkostwinner</b>
        <br>
        <form name="mijnForm3">
            <input type="radio" id="getal6" name="hoofdkostwinner"
                value="22" checked> Tot en met €1000,-
              <br>    
            <input type="radio" id="getal7" name="hoofdkostwinner"
                value="29"> €1001,- tot en met €2000,-
              <br>
            <input type="radio" id="getal8" name="hoofdkostwinner"
                value="38"> €2001,- tot en met €3000,-
             <br>
            <input type="radio" id="getal9" name="hoofdkostwinner"
                value="38"> €3001,- of hoger
            <br>
            <br>
            <b> Oppervlakte woning</b>
            <br>
        <form name="mijnForm4">
            <input type="radio" id="getal10" name="Oppervlakte"
                value="22" checked> tot en met90m²
              <br>    
            <input type="radio" id="getal1" name="Oppervlakte"
                value="29"> 91m² tot en met 140m²
              <br>
            <input type="radio" id="getal12" name="Oppervlakte"
                value="38"> 141m² tot en met 190m²
             <br>
            <input type="radio" id="getal13" name="Oppervlakte"
                value="38"> 191m² of meer
            <br>
        </form>
        <input type="button" id="show_sum" value="Show Sum" />
    </body>
 </html>   
  • 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-18T00:36:19+00:00Added an answer on June 18, 2026 at 12:36 am

    The following is a vanilla js solution:

    function checkTotal() {
       var a =  document.querySelectorAll('input:checked'); 
       var total = 0;
       for(var x=0; x < a.length;x++){
          total += a[x].value * 1;
       }
       alert(total);
    }
    

    Note: queryselector is available in (relatively) modern browsers only http://caniuse.com/queryselector

    Example here: http://jsfiddle.net/2eU4E/1/

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

Sidebar

Related Questions

Does anyone know a solution to this? I'd like to display the sum of
Does anyone know of any websites, or (preferably) downloadable packages that you can use
Does anyone know how to get the size of a dabase that is hosted
Does anyone know a program or online service that allows to create an XML
Does anyone know how to implement the Sum-of-Subsets problem in Java from this pseudo
Does anyone know if there is a way to generate different code in the
Does anyone know of a free tool, similar to what is built into Visual
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does anyone know of a mechanism in Sybase ASA 9 / Sybase SQL Anywhere
Does anyone know of a way to contain a nonbreaking space in an html

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.