Kermit Piper wrote:
> Hello,
>
> I have a validation script for upc codes which is currently working for
> values that are entered into one text box. I've been asked to break up
> the text box into 3 separate fields to accept the 1st digit, middle 10
> digits, then last check digit. What I'm doing is substringing the
> initial values then concatenating them. What I'm not sure of is, how to
> handle the validation. I was previously firing an onBlur after the text
> box but now that I have three, and I need the values to concatenate
> into one for the validation. Should I just fire a function after the
> 3rd field that concatenates the 3 values, then pass that value to the
> validation function? Or is there a better way?
>
Validating on blur is seen as rather hostile and un-professional, but
if you must,
just call the function with the onblur event of all the involved
fields, then have the
function abort if any field is blank.
--
S.C.
Received on Mon May 1 03:41:09 2006