Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB equivilent for Java snippet

Status
Not open for further replies.

PeachRL

Technical User
Nov 9, 2000
6
US
Can anyone show me the VB equivilent for the following Java snippet??

var checkOK = "0123456789-()-";
var checkStr = theForm.Phone3.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert(&quot;Please enter only digit and \&quot;()-\&quot; characters in the \&quot;Phone3\&quot; field.&quot;);
theForm.Phone3.focus();
return (false);
}
Any help welcomed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top