Advanced Search

Results 1 to 2 of 2

Thread: CALCULATE total

  1. #1
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation CALCULATE total

    I'm very new to this. All I need to do is take a number that the client enters into a field and multiply it by either 475 or 275 (depending on which field box they enter the number) and add it to another field box which multiplies the number entered by 30.

    So, if a client enters the numbe 2 in the 475 box and nothing else, the total would be 950. Dollars actually, but I need to figure that out too.

    Help please!!!
    thanks SO much!
    Diane

  2. #2
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Yeah. Sure.

    Code:
    <input type="text" id="num1"> <input type="text" id="num2"> <input type="button" value="Multiply" onclick="document.getElementById('tot').value = document.getElementById('num1').value*275;document.getElementById('tot1').value = document.getElementById('num1').value*475;"> <input type="text" id="tot"> <input type="text" id="tot1">
    That should do it.

    -magicyte

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •