thanks bud yeah that is the name of the function call and that helped alot, i was trying to see what was working with this and what was not working, what was happening is that some of the call was functioning but not all of it.
this helped me tons thanks so much, i got it working by removing what didnt work and placing in some alt code to shift the var and check it.
works great but i have a new challenge... if you want i will start a new thread bud
im trying to capture only .com .net .ca and .org in my email string as i only want to accept popular email extensions, this will help me cut down on the trashy junk emails ..
this is what i have so far but im not getting the structure correct as i do not know of another way to do this other than an array, and i have never writen an array and checked it with the indexOf function.
here iswhat i have it all works great accept the last part where i split the email extentions, and im stuck bigtime i dont know the format here. And i dont know how to just take and say check bemail array for one of those values
var emailext:Array = new Array();
bemail.mail(".com");
bemail.mail(".net");
bemail.mail(".ca");
bemail.mail(".org");
if (email.length <= 5)
alert("email addresses must be more than 5 characters long");
else if(email.indexOf(' ') >= 0)
alert("email addresses cannot have spaces in them");
else if (email.indexOf('@') == -1)
alert("valid email address must have an @ in it");
else if (email.indexOf('.') == -1)
alert("valid email address must contain a . in it");
This is the part im stuck on bud, below, i changed it to bmail so i would have a new var to look at
var searchIndex:int = bemail.indexOf(ARRAY=".com,.net,.ca,.org");
if(searchIndex == -1)
alert("valid email address must contain one of the following .com,.net,.ca,.org");
i also know im not checking the actual input of email on the array part im just checking the array, now im really lost
can i do something like this would it be easier to just an || statement and not even use the array
else if (email.indexOf('.com') || ('.net') || yedayada == -1)
alert("valid email address must contain .com .net .org .ca");