WTH Javascript/ HTML/CSS coder to fix one page function

Discussion in 'Programming' started by 5ive, May 18, 2012.

  1. #1
    Im looking to hire a coder that can fix a Javascript issue for me, im working on a site where im stuck at a function. What im trying to do is a function like this page here http://www.mardmedia.se/webbpaket/ where you click on the options on the lower half of the page you get the sum of the cost for that function added to the total cost. I have the script seen here http://www.javascriptbank.com/simple-javascript-auto-sum-with-checkboxes.html

    What im stuck at is that the javascript wont work in my <ul><li> TAGS


    So i need you to fix this issue in a cross-browser friendly way and tune the script to fit my page looks.



    PM me your timetable and a quote, do NOT pm me asking for a budget.
     
    5ive, May 18, 2012 IP
  2. 5ive

    5ive Well-Known Member

    Messages:
    1,348
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    185
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    ok I got some PMs but still nothing im happy with..


    ill pay $5 for you to show me a way to get this to work, it must be cross browser compatible tho...


    Here is the JS code
    <script type="text/javascript">
    // Created by: Jay Rumsey | [url]http://www.nova.edu/~rumsey/[/url]
    // This script downloaded from JavaScriptBank.com
    
    function UpdateCost() {
      var sum = 0;
      var gn, elem;
      for (i=0; i<5; i++) {
        gn = 'game'+i;
        elem = document.getElementById(gn);
        if (elem.checked == true) { sum += Number(elem.value); }
      }
      document.getElementById('totalcost').value = sum.toFixed(2);
    } 
    </script>
    Code (markup):
    Here is the HTML code for the JS function
    <input type="checkbox" id='game0' value="9.99"  onclick="UpdateCost()">Game 1 ( 9.99)<br>
    <input type="checkbox" id='game1' value="19.99" onclick="UpdateCost()">Game 2 (19.99)<br>
    <input type="checkbox" id='game2' value="27.50" onclick="UpdateCost()">Game 3 (27.50)<br>
    <input type="checkbox" id='game3' value="45.65" onclick="UpdateCost()">Game 4 (45.65)<br>
    
    HTML:


    Here is my HTML code where i want the checkboxes in
    <ul class="BorderStyleLt">
                  <li></li>
                  <li></li>
                  <li></li>
                  <li></li>
                </ul>
    HTML:


    The only "problem" is the output (the sum) must be styles as the rest of the page is, which is
    .Style03{
    	font-size:24px !important;
    	font-weight:bold;
    	color:#00cece !important;
    	}
    Code (markup):
     
    5ive, May 22, 2012 IP