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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:32:00+00:00 2026-06-13T20:32:00+00:00

Try to add value from checkboxes and item list to make a price calculator.

  • 0

Try to add value from checkboxes and item list to make a price calculator. where client select the type of service they want from item list or checkboxes , and price calculator give the quote for price.

$(".option").click(function() {
var total = 0;
$(".option:checked").each(function() {
    total += parseInt($(this).val(), 10);
});
alert(total);
});


<table width="98%" cellpadding="0" cellspacing="0" summary="Summary Here">
    <thead>
      <tr>
        <th>Basic</th>
        <th>Requirements</th>
      </tr>
    </thead>
    <tbody>
      <tr class="light">
        <td height="31">Number of Pages</td>
        <td><select class="option">
          <option value="50">1</option>
          <option value="100">2</option>
          <option value="200">3</option>
          <option value="250">4</option>
          <option value="400">5-10</option>
          <option value="800">11-20</option>
          <option value="0" selected="selected">0</option>
        </select></td>            
      </tr>
      <tr class="dark">
        <td>Domain Registration</td>
        <td><input class="option" type="checkbox" value="10" />Yes</td>
        </tr>
      <tr class="light">
        <td>Website Hosting</td>
        <td><input class="option" type="checkbox" value="60" />Yes</td>
       </tr>
       <tr class="dark">
       <th>Options Extras</th>
       <td></td>
       </tr>
      <tr class="light">

        <td>Image Gallery Page</td>
        <td><input class="option" type="checkbox" value="100" />Yes</td>
        </tr>
        <tr class="dark">
       <td>Videos</td>
       <td><input class="option" type="checkbox" value="60" />Yes</td>
       </tr>
       <tr class="light">          
        <td>Membership System</td>
        <td><input class="option" type="checkbox" value="100" />Yes</td>
        </tr>
        <tr class="dark">
       <td>Forum</td>
       <td><input class="option" type="checkbox" value="300" />Yes</td>
       <tr class="light">          
        <td>Image Creation</td>
        <td><select class="option">
          <option value="50">5-10</option>
          <option value="100">11-20</option>
          <option value="200">21-30</option>
          <option value="250">31-40</option>
          <option value="400">41-50</option>
          <option value="800">51-100</option>
          <option value="0" selected="selected">0</option>
        </select></td> </td>
        </tr>
        <tr class="dark">
       <td>Standard Mobile Website</td>
       <td><input class="option" type="checkbox" value="300" />Yes</td>
       </tr>
       <tr class="light">          
        <td>Site or Product Search</td>
        <td><input class="option" type="checkbox" value="60" />Yes</td>
        </tr>
        <tr class="dark">
       <td>File Uploads</td>
       <td><input class="option" type="checkbox" value="90" />Yes</td>
       </tr>
    <thead>
      <tr>
        <th></th>
        <th><div id="total">£0</div></th>
      </tr>
    </thead>

    </tbody>
  </table>
  • 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-13T20:32:01+00:00Added an answer on June 13, 2026 at 8:32 pm

    First, put a link to the jquery script in your header, above your other script tag:

    <script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
    

    Then use the .change() function in jquery, then add up all option:selected and input.option:checked.

    <script type="text/javascript">
      $(document).ready(function() {
        $(".option").change(function() {
          var total = 0;
          $(".option option:selected, input.option:checked").each(function() {
            total += parseInt($(this).val(), 10);
          });
          $("#total").text("£" + total);
        });
      });
    </script>
    

    Demo here: http://jsfiddle.net/vZwFx/

    If you want your “total” div to be updated instead of an alert popping up, simply replace the alert call with $("#total").text("£" + total);

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

Sidebar

Related Questions

I try to bind value from input select to attribute selectedValue in controller. This
When I try to add struct in two-dimensional array cin>>array[1][items.stoka_ime]; in error list write
Getting this error when try to add an item to my repositories/context: Collection has
When I add the value from database, the listbox should avoid the duplicate value.
I have an object containing a list sent from a C# client to a
I am reading a value from my App.config; which is: <add key=someValue value=0.05/> And
I am adding string[] into Arraylist, But when i try to retrieve value from
i try to add checked in my checkbox if value in checkbox is same
I try to download a photo from the database. In database, the field type
I like to pass selected item value from ListView to another activity.I am using

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.