Skip to main content
Inspiring
May 22, 2006
Answered

Form problem with less than (le)

I have a form, when users push the next button there will be some input field checking before the user is realy going to the next page.
Now I want to check if the zip code (Netherlands) is not less than 6 postions.
In the begining I used this code:

if (zipcode_txt.text eq "") {
result_txt.text = "Your zipcode is empty";
}

But now I want to check if there are really 6 positions in the input field. I have already been trying this code, but that's not working:

if (zipcode_txt.text le 6) {
result_txt.text = "Your zipcode is empty";
}

Can someone help me out here
This topic is closed to new replies. Start a new post to keep the conversation going.
2m91_2
2m91_2Correct answer
Inspiring
May 22, 2006
I don't know why you want to use "eq" and "le" instead of "==" and "<" but you should at use:

if (zipcode_txt.text.ength < 6) {
result_txt.text = "Your zipcode is empty";
}

2 replies

2m91_2
2m91_2Correct answer
Inspiring
May 22, 2006
I don't know why you want to use "eq" and "le" instead of "==" and "<" but you should at use:

if (zipcode_txt.text.ength < 6) {
result_txt.text = "Your zipcode is empty";
}
Translate
Inspiring
May 22, 2006
Your totale write, forgot the actionscript option .lenght

Thanks for your support
Translate