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("Please enter only digit and \"()-\" characters in the \"Phone3\" field."
theForm.Phone3.focus();
return (false);
}
Any help welcomed!
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("Please enter only digit and \"()-\" characters in the \"Phone3\" field."
theForm.Phone3.focus();
return (false);
}
Any help welcomed!