Ahh! Im confused 😕
To be clear, I want to trap this invalid email error on the page that I am on (before I go to the follow up page). I want the JavaScript to to call upon this email validation function as the user presses Submit.
I have a feeling it would look like this (see below)....an if/esle statement...but I do not know how to get into the form's code to edit it....
can you offer some advice?
<script type="text/javascript">
function checkEmail() {
var e1 = document.getElementById('Email').value;
var e2 = document.getElementById('confirmEmailAddress').value;
if (e1 != e2) {
return true;
}
else
{
alert('Please verify the email address!');
return false;
}
}
</script>
and set the additional attribute of the submit button to
Code:
onsubmit=" return checkEmail('email1','email2');"