I have this function in javascript to check if the e-mail in the form is valid and I can't write it on VBScript, because I don't know what is the analog of SUBSTRING and LENGHT.
May be somebody can help me how to check it?
function mailAddressIsValid(mailAddress)
{
var atPresent=false;
var dotPresent=false;
for(var i=0; i < mailAddress.length;i++)
{
var c=mailAddress.substring(i,i+1);
if(c == "@"
atPresent=true;
if(c == "."
dotPresent=true;
}
if(atPresent == true && dotPresent == true)
return true;
else
return false;
}
May be somebody can help me how to check it?
function mailAddressIsValid(mailAddress)
{
var atPresent=false;
var dotPresent=false;
for(var i=0; i < mailAddress.length;i++)
{
var c=mailAddress.substring(i,i+1);
if(c == "@"
atPresent=true;
if(c == "."
dotPresent=true;
}
if(atPresent == true && dotPresent == true)
return true;
else
return false;
}