www.webdeveloper.com
Results 1 to 2 of 2

Thread: Adding up the fields to make 100% in a form

  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Unhappy Adding up the fields to make 100% in a form

    Hi

    I wondered whether someone can point me to a script which would perform a simple calculation.

    In this survey i have created
    http://www.altassets.com/surveysmade...2008survey.php

    in point 4b
    ----------------------------
    b.) What do you anticipate will be your allocation split between re-ups and new investment in funds in 2008?



    Re-ups (textfield name: ReupsSplitPercentage) %

    New (textfield name: NewSplitPercentage) %

    ----------------------------


    I need to make sure that the two fields do not add up to more than a 100%. If one number is entered the other gets automaticly adjusted. Alternatively I could add a Total field which would be a sum of the two, and which would display an error message when the sum is bigger than 100%.


    At the moment both fields have for a simple validation applied where either can be heigher than 100.


    I am a bit of a novice in java script , any help would be very much appreciated...


    Many thanks in advance!!

    Gayeta

  2. #2
    Join Date
    Nov 2003
    Posts
    9

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles