SeanPaul72
08-07-2003, 02:55 PM
here is a list of variables that the function uses to validate data.
NumCheck = "0123456789"
dblCheck = "0123456789."
StrCheck = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
SpaceCheck = " "
OtherCheck = "<,>.?/:;{[}[|\!@#$%^&*()_-+="
Then here is the function:
function dbCheck(Ctrl, strCheck)
{
newstr = "";
for (i=0; i<Ctrl.value.length; i++)
{
letter = Ctrl.value.charAt(i);
if(isValid(letter, strCheck))
{
newstr = newstr + letter
}
}
Ctrl.value = newstr
}
Then here is the call of the function:dbCheck(document.lion1003.L22, dblCheck + SpaceCheck + StrCheck);
Could someone explain the function to me. I'm not sure I understand it's necessity or its process.
Thanks.
NumCheck = "0123456789"
dblCheck = "0123456789."
StrCheck = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
SpaceCheck = " "
OtherCheck = "<,>.?/:;{[}[|\!@#$%^&*()_-+="
Then here is the function:
function dbCheck(Ctrl, strCheck)
{
newstr = "";
for (i=0; i<Ctrl.value.length; i++)
{
letter = Ctrl.value.charAt(i);
if(isValid(letter, strCheck))
{
newstr = newstr + letter
}
}
Ctrl.value = newstr
}
Then here is the call of the function:dbCheck(document.lion1003.L22, dblCheck + SpaceCheck + StrCheck);
Could someone explain the function to me. I'm not sure I understand it's necessity or its process.
Thanks.