J
Jenny
Hi All,
I have this code. When I type in (e-mail address removed), it should run
alert("Thanks for your interest.") line. But it does not. Why and
how can I correct it? I use IE 6 with windows xp.
Thanks a lot.
<HTML><body>
<form name="myForm">
<INPUT TYPE="text" VALUE="Enter email" NAME="userEmail"
onChange=validateInput()>
</form>
<script type="text/javascript">
this.myForm.userEmail.select()
function validateInput() {
userInput = this.myForm.userEmail.value
document.write(userInput)
if (userInput.indexOf('@')>0 && userInput.indexOf('.')>0)
alert("Thanks for your interest.")
else
alert("Please check that your email details are correct before
submitting")
}
</script>
I have this code. When I type in (e-mail address removed), it should run
alert("Thanks for your interest.") line. But it does not. Why and
how can I correct it? I use IE 6 with windows xp.
Thanks a lot.
<HTML><body>
<form name="myForm">
<INPUT TYPE="text" VALUE="Enter email" NAME="userEmail"
onChange=validateInput()>
</form>
<script type="text/javascript">
this.myForm.userEmail.select()
function validateInput() {
userInput = this.myForm.userEmail.value
document.write(userInput)
if (userInput.indexOf('@')>0 && userInput.indexOf('.')>0)
alert("Thanks for your interest.")
else
alert("Please check that your email details are correct before
submitting")
}
</script>