Re: OT: JS number check

2004-07-20 Thread Qasim Rasheed
This might help you function isPostiveDecimal(num){ var validChars ="0123456789."; var allValid = true;    var decPoints = 0;    var allNum = ""; for (i = 0;  i < num.length;  i++){     ch = num.charAt(i);     for (j = 0;  j < validChars.length;  j++)    if (ch == validCh

RE: OT: JS number check

2004-07-20 Thread Kevin Rosenthal
HI Qasim, I was following this thread and wanted to ask a question. I follow your logic all the way until the break; at line 10. Can you comment the code to explain what is going on? I am real new and trying very hard to understand the code and the logic. Thanks! Kevin Professional Student (

Re: OT: JS number check

2004-07-20 Thread Joe Rinehart
This may help:
function isNumber2(inputStr, field) {
  if (!inputStr.match(new RegExp("[^0-9.]"))) {
    alert ("Please make sure your " + field + " entry are numbers only");
    return false;
  }
  return true;
}

alert(isNumeric("0.3"));
-joe [Todays

RE: OT: JS number check

2004-07-20 Thread Samuel R. Neff
and then try alert(isNumeric("0.3.2")); :-) > -Original Message- > From: Joe Rinehart [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 20, 2004 4:12 PM > To: CF-Talk > Subject: Re: OT: JS number check > > This may help: > > <br> > fu

Re: OT: JS number check

2004-07-20 Thread Joe Rinehart
Oops...knew I rattled that off too quickly.  Yeah, use your _expression_. :) -joe - Original Message - From: Samuel R. Neff <[EMAIL PROTECTED]> Date: Tue, 20 Jul 2004 17:04:29 -0400 Subject: RE: OT: JS number check To: CF-Talk <[EMAIL PROTECTED]> and then try alert(isNu