A
Andy
Hi
I am validating myform fields in an i loop. I have 20
fields named f1 to f20. I am checking the value of each
using eval('myform.f' + i + '.value').
When I find an error, I want to put out an alert and set
focus on the erroneous field. How do I set focus on this
field if I only know the i value?
Something like ('myform.f' + i + '.onfocus())
The icing on the cake ... can I change the bgcolor of the
field to red as well?
I am validating myform fields in an i loop. I have 20
fields named f1 to f20. I am checking the value of each
using eval('myform.f' + i + '.value').
When I find an error, I want to put out an alert and set
focus on the erroneous field. How do I set focus on this
field if I only know the i value?
Something like ('myform.f' + i + '.onfocus())
The icing on the cake ... can I change the bgcolor of the
field to red as well?