Is this easy, a little confused!
Hi guys
If anyone can help a little with this it would be very much appreciated!
I have a test results form with just a single input box for each test result.
eg
-
<label for="testscore_1">
<input type="text" class="text" name="testscore_1" id="testscore_1" value="" maxlength="2"/></label>
<label for="testscore_2">
<input type="text" class="text" name="testscore_2" id="testscore_2" value="" /></label>
<label for="testscore_3"><input type="text" class="text" name="testscore_3" id="testscore_3" value="" /></label>
Each score relates to a difference test, which can vary in total, eg out of 10, out of 20, or out of 30, stored in labels..
-
<label for="testtotal_1">20</label>
<label for="testtotal_2">10</label>
<label for="testtotal_3">30</label>
etc etc
Anyway when someone enters their score into the input box, lets say 17.
I want to have somewhere -3 displayed on screen ( 17/20 = -3 off total)
and the same for each other score/test, there can be over 20 different tests.
So I want one jquery function i can use for each test, not 20 variations of each test addressing each id, testscore_1, testsocre_2 etc etc?
thanks for any input or help on this one.