On Mar 10, 1:18 am, JL <justin.la... (AT) gmail (DOT) com> wrote:
Quote:
I think i fixed it...
I changed
frm.elements[i].value.indexOf(val,0) != -1))
to
frm.elements[i].value.indexOf(val,0) == 0)) |
Right! And sorry, that is what I meant to type:
frm.elements[i].value.indexOf(val) == 0
so the 0 in argument is not needed; sometimes you think one things but
your fingers are typing what they used to ( == -1 is the most
casual). :-)
It also can be made as a RegExp check, I just wanted to keep things as
simple as possible, so used indexOf instead.