I'm sorry if it's not the right place for this question, but 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:

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?

Recommended Answers

All 2 Replies

Might try asking in a Javascript forum under web development.

Right! I just realized my mistake.. ;)

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.