It worked fine for me on IE 5.5, I just tested it with the following code:
<script>
var ch = 8;
if ((ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z" ) || (ch >= "0" &&
ch <= "9" )) {
alert('good');
}
</script>
What web browser are you running this on? Try using single quotes instead of
double quotes. You could also use a regular expression to do this.
_____________________________________________
Pete Freitag ([EMAIL PROTECTED])
CFDEV.COM
ColdFusion Developer Resources
http://www.cfdev.com/
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Miao, Franco CAWS:EX
Sent: Sunday, October 28, 2001 7:00 PM
To: [EMAIL PROTECTED]
Subject: Javascript grammer help?
The following sentence works fine in Javascript
if ((ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z" ) )
but if I change to :
if ((ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z" ) || (ch >= "0" &&
ch <= "9" ))
The (ch >= "0" && ch <= "9" ) part won't functioning.
Franco
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com