Multiple emails validation in one text box with comma
hi there..i need some help on this email validation. i got a text box, can let the users to input many email with the seprator comma(,) or this (. then how can i use the javascxript to do a validation for it? plz help..i duno how to code it. plz help on code.thanx alot
Multiple emails validation in one text box with comma
Use this java script
and it is workink fine
Code:
<script language="JavaScript1.2">
var testresults
function checkemail()
{
//var str=document.validation.txtAnchorEmail.value
var str=document.getElementById('ctl00_ContentPlaceHolder1_txtAnchorEmail').value;
var filter=/^.+@.+\..{2,3}$/
if (filter.test(str))
testresults=true
else
{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}
</script>
<script>
function checkbae(){
if (document.layers||document.all)
return checkemail()
else
return true
}
</script>
<asp:TextBox id="txtAnchorEmail" onBlur="return checkbae();" runat="server" CssClass="frm_input"></asp:TextBox