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 (SSD)
_____
From: Qasim Rasheed [mailto:[EMAIL PROTECTED]
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 == validChars.charAt(j))
break;
if (j == validChars.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (allValid){
if (isNaN(Number(num)))
allValid = false;
}
if (allValid){
if (Number(num) < 0)
allValid = false;
}
if(allValid)
return true;
else
return false;
}
Qasim
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.253 / Virus Database: 263.4.7 - Release Date: 7/19/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

