Dawnyy
07-07-2006, 12:10 PM
I have an internet form with many input boxes and I need to check most of them to see if they're numeric.
I have written an isnumeric function and I realise I could type a line such as
If (IsNumeric(document.getElementById( TagName ).value)) {
return true
else
return false
}
for each one individually to test, but since there are hundreds of fields, I was wondering if there was an easier way of doing this
Is there any way of looping through the elements (each input box) on my form?
Any example code would be a great help.
Many Thanks
Dawn
I have written an isnumeric function and I realise I could type a line such as
If (IsNumeric(document.getElementById( TagName ).value)) {
return true
else
return false
}
for each one individually to test, but since there are hundreds of fields, I was wondering if there was an easier way of doing this
Is there any way of looping through the elements (each input box) on my form?
Any example code would be a great help.
Many Thanks
Dawn