Results 1 to 2 of 2

Thread: Addition in Form

  1. #1
    Join Date
    Oct 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Addition in Form

    I want to use some addition and or multiplication in a Form. For example, I am selling widgets for 3 dollars and if some one wants 5 of them it should MULTIPLY '*' to 15 dollars. Is there some way I can put this in a FORM or on an HTML page. Can I use Java Script or better to use ASP. (VB) ..thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I just made this, is this what you mean?

    (insert in BODY area)
    Code:
    <p>Item Price <input type="text" name="price" size="20"></p>
    <p>Qty <input type="text" name="quant" size="20"></p>
    <p>Total <input type="text" name="text1" size="20"></p>
    
    <script>
    
    function calc(){
    
    text1.value = price.value * quant.value
    
    setTimeout("calc()",100);
    
    }
    
    setTimeout("calc()",100);
    
    
    </script>
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

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
  •