[Javascript] If else statement help

Geoff Corriere geoff at cpe1.com
Thu Oct 2 10:51:56 CDT 2003


I believe you just have a syntax error. Instead of:

> if (theForm.rn.value.length == 4) || (theForm.rn.value.length == 5) || 
> (theForm.rn.value.length == 8)

You need

if(  (theForm.rn.value.length == 4) || (theForm.rn.value.length == 5) 
|| (theForm.rn.value.length == 8)  )

parenthesis are need to be around ALL the values you are checking. The 
if statement by itself is
if( something )
your something is, of course
(theForm.rn.value.length == 4) || (theForm.rn.value.length == 5) || 
(theForm.rn.value.length == 8)

Geoff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 691 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20031002/6dcbbee1/attachment.bin>


More information about the Javascript mailing list