Hi all,
i am writng an asp page which, when the process button is clicked, i want it to check the balances for all credits and debits and check to see if they are equal.
Unfortunately i have over 137 fields, 37 of which are for credits, the rest are debits.
i can simply add the fields using a simple function
and so on so i have 2 variables i and j with totals in, compare the 2, if correct continue!!
is there an easier way to do this cos like i said, theres 137 of them, pretty long code!!
I want to do this check within the page before i submit the values to the submit page without having to reload the page.
Is there a way of simplyfying my code, or an easier way to reference the values.
Any ideas? if you want me to expand on this please let me know
thank you
daveJam
*two wrongs don't make a right..... but three lefts do!!!!*
i am writng an asp page which, when the process button is clicked, i want it to check the balances for all credits and debits and check to see if they are equal.
Unfortunately i have over 137 fields, 37 of which are for credits, the rest are debits.
i can simply add the fields using a simple function
Code:
var i = parseInt(document.newPayment.inDbt1.value) + parseInt(document.newPayment.inDbt2.value)
var j = parseInt(document.newPayment.inCrd1.value) + parseInt(document.newPayment.inCrd2.value)
and so on so i have 2 variables i and j with totals in, compare the 2, if correct continue!!
is there an easier way to do this cos like i said, theres 137 of them, pretty long code!!
I want to do this check within the page before i submit the values to the submit page without having to reload the page.
Is there a way of simplyfying my code, or an easier way to reference the values.
Any ideas? if you want me to expand on this please let me know
thank you
daveJam
*two wrongs don't make a right..... but three lefts do!!!!*