[Javascript] If else statement help
Chris Tifer
christ at saeweb.com
Thu Oct 2 11:53:13 CDT 2003
That's probably it and I overlooked it. When you work with ASP a bit, you tend to forget little things like that until an error pops up.
Chris Tifer
----- Original Message -----
From: Geoff Corriere
To: [JavaScript List]
Sent: Thursday, October 02, 2003 11:51 AM
Subject: Re: [Javascript] If else statement help
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
------------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20031002/af2b60f1/attachment.htm>
More information about the Javascript
mailing list