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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:44:49+00:00 2026-06-15T17:44:49+00:00

i was trying to multiply the answers of my span. for example the value

  • 0

i was trying to multiply the answers of my span.

for example the value <span id="total_f">210</span>

and the btw .21 it was %21 percent so we need to make it .21 to multiply it and get the total. btw is VAT in netherlands

if you see the jquery var get_total i did multiply the mul

is my jquery wrong?

this is my jquery

$(document).ready(function(){
   var sum = 0;
   $('input[name=sumof]').each(function(){
        sum += parseInt($(this).val());
   });
   $('input[name=total_f]').val(sum);
   $('#total_f').text(sum);

   var mul = parseInt($('input[name=total_f]').val());

   var get_total = mul * parseInt($('input[name=btw]').val());

   $('input[name=s_btw]').val(get_total);
   $('#s_btw').text(get_total);
});

my html

<table cellpadding="5" cellspacing="0" width="100%">
    <tr>
        <td><strong>Sub Total</strong></td>
        <td>
        <?php
            if ( $get_total_computation['currency'] == 'euro' ) {
                $msg_tot = '&euro;';
            } elseif ( $get_total_computation['currency'] == 'usd' ) {
                $msg_tot = '&#36;';
            }
            echo $msg_tot;

        ?>                      
            <span id="total_f"></span>
            <input type="hidden" name="total_f" value="" />
        </td>
    </tr>
    <tr>
        <td>
            <?
            echo $get_total_computation['quo_btw'];
            $get_per = explode( '%', $get_total_computation['quo_btw']);
            ?>
            <input type="hidden" name="btw" value=".<?=$get_per[0];?>" />
        </td>
        <td>
            <span id="s_btw"></span>
            <input type="hidden" name="s_btw" value="" />
         </td>
    </tr>
    <tr>
        <td><strong>Total</strong></td>
        <td><?=$btw;?></td>
    </tr>
</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-15T17:44:50+00:00Added an answer on June 15, 2026 at 5:44 pm

    Use parseFloat to parse values that contain decimal numbers. In your case, btw contains the value .21 for which parseInt is in-appropriate.

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

Sidebar

Related Questions

I am trying to multiply a double value by -1 to get the negative
Looking for a little help trying to get the value of two selected buttons,
I'm trying to compare and multiply 2 random number variables with the int value
Am new to this guys need your help! Am trying to multiply two field
I'm trying to multiply two arrays without using numpy. But, I receive an error
I'm trying to multiply the same double (square it) but the number comes out
I'm trying to multiply two matrices using vecLibs' cblas: #include <stdlib.h> #include <string.h> #include
I am trying to overload the * operator in order to multiply two objects
Im trying to make multiple quizes that will keep track of each quiz on
So I have been trying to combine the answers of these two questions: C#

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.