I really need help on this one.
The problem is quite simple-
I've got many text fields that user has to fill. The thing I can't figure out is how NOT to allow go to next field if the length of current field's value is less than 6 digits. I tried something like this, but I know almost nothing about javascript so it's not working:

var lg = getField("From[0]").value.length;
if(lg<6 && lg>0){
getField("From[0]").setFocus();
}

And I've put this in onBlur event... Could anybody help me?

Not my are of expertice but maybe this can help, link

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.