in that case the usual cause would be a variable outside the allowed value
so either the loop value (i) is out of range or the password is empty.
have you debugged by printing the values to screen before the error occurs?
Why do you use a while/wend loop for something so basic BTW?
for i = 0 to len(varPassword)
' run check here
next
would accomplish what you want
or a simple regex would check the input at one call
Code:
<%
function CheckNumeric(strIn)
' function to validate numeric input
dim objRE
set objRE = New RegExp
objRE.Pattern = "[0-9]"
objRE.Global = True
CheckNumeric = objRE.test(strIn)
set regEx = nothing
end function
%>
Will return true if strIn contains a number false if not
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|