rcbuchanan
asked on
Very Simple email validation onchange?
I need a very simple email validation script (so simple I can't do it :-( ). can u help?
I have this input field:
<input name="register_email" type="text" size="30" maxlength="50" onblur="this.value=this.va lue.replac e(/ /g,'_')" onfocus="change2Msg(2);" value="<cfif isdefined('url.em')><cfout put>#url.e m#</cfoutp ut></cfif> ">
I need to FORCE the user to stay in the input field if no '@' or '.' is part of the entered string. I'm sure this is goofy but it would help me with a very simple task I need.
Does this make sense?
In otherwords ... when I tab (or click) into this text field 'register_email' and I fail to enter a text string that contains an '@' and an '.' (i.e. fred instead of 'fred@fred.com') then when I leave the field ... force the user BACK into the text input field.
(i need to keep that onfocus="change2Msg(2);" code in my line and the coldfusion output field for value.)
Thanks for any help!
Richard
I have this input field:
<input name="register_email" type="text" size="30" maxlength="50" onblur="this.value=this.va
I need to FORCE the user to stay in the input field if no '@' or '.' is part of the entered string. I'm sure this is goofy but it would help me with a very simple task I need.
Does this make sense?
In otherwords ... when I tab (or click) into this text field 'register_email' and I fail to enter a text string that contains an '@' and an '.' (i.e. fred instead of 'fred@fred.com') then when I leave the field ... force the user BACK into the text input field.
(i need to keep that onfocus="change2Msg(2);" code in my line and the coldfusion output field for value.)
Thanks for any help!
Richard
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.