function fieldValidation()
{
        //alert("Detail: ");
        var str = document.getElementById("txbemail1").value;
        var result = "Hello...!";
        if (str != '') 
        {
           if (!(emailExp.test(str))) 
           {
              result += "\n Invalid Email";
           }
        }
        else 
        {
           result += "\n Email1";
        }
        alert("Error Detail: " + result);
}

when calling javascript function only first statement excuted but not subsequent statement, why this is so...?

Related posts

Recent Viewed