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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:36:55+00:00 2026-05-26T20:36:55+00:00

I have the following HTML <p><input id=revenue type=text value=100000 /><span id=howmuch><a href= class=ka_button small_button

  • 0

I have the following HTML

<p><input id="revenue" type="text" value="100000" /><span id="howmuch"><a href="" class="ka_button small_button small_cherry" target="_self" style="opacity: 1; "><span>How Much?</span></a></span></p>
<p id="howmuchpercent">You save <span id="savingspercent">$<span id="howmuchspan">23000.00</span>*</span></p>

And the following Javascript

jQuery(document).ready(function(){
    jQuery('span#howmuch a').click(function(e){
        e.preventDefault();
        var revenue = jQuery('input#revenue').val();
        var savingsonrevenue = revenue * 0.23;
        jQuery('span#howmuchspan').text(savingsonrevenue.toFixed(2));
    });
});

When I click the How Much? button for some reason instead of replacing the contents of the span#howmuchspan it is replacing the entire span resulting in the following HTML

<span id="savingspercent">57500.00</span>

instead of

<span id="savingspercent">$<span id="howmuchspan">57000.00</span>*</span>
  • 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-26T20:36:56+00:00Added an answer on May 26, 2026 at 8:36 pm

    You probably have code somewhere else that’s removing the contents of savingspercent. I created a jsFiddle using the code you posted, and it works as expected:

    http://jsfiddle.net/sYA7j/

    EDIT:

    You have some similar code at the bottom of the page (lines 451-458). Remove it and you should be all set:

    jQuery(document).ready(function(){
        jQuery('span#howmuch a').click(function(e){
        e.preventDefault();
        var revenue = jQuery('input#revenue').val();
        var savingsonrevenue = revenue * 0.23;
        jQuery('p#howmuchpercent span').text(savingsonrevenue.toFixed(2));
        });
    });
    

    Created a jsFiddle to test it, and that is your problem. See here: http://jsfiddle.net/JDqBS/

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

Sidebar

Related Questions

I have following html: <div class=rows> <div class=row><input type=text onchange=javascript:getIndex(this); value= /></div> <div class=row><input
I have the following html code: <div class=Radios> <span class=radio> <input type=radio value=1> yes
I have following html. <fieldset id=fieldset-step_3> <input type=text value=2 id=rule_form-lead_time name=rule_form[lead_time]> <select class=w50 id=rule_form-operator
I have the following HTML dinamically generated: ... <tr> <td><input type=text class=q value=5 name=q[]
I have the following html: <div> <input type=text maxlength=2 class=day-spin-month></input> <span>/</span> <input type=text maxlength=2
I have the following html code: <input type=text id=theInput value=/> <a href=# id=theLink>Click me</a>
I have the following html: <ul> <li><a href='#'>Item 1</a><input type='text' value='whatever' /></li> <li><a href='#'>Item
I have the following HTMl: <input id=brandID name=brandID type=hidden value= /> <select id=selectList class=textfield70pc
I have the following HTML: <input type=text id=endDateEditBox value= style=margin-left:5px; height:18px; width:70px; vertical-align:middle; onchange=validateDate('endDateEditBox',
I have the following HTML: <form id=test> <input type=radio value=A name=C1/> <a href=javascript:selectCheckbox('C1', '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.