1
0
Fork 0

button click event required an extra logic gate

2015
joates 10 years ago
parent 6b27d611fa
commit 633cf0b69a

@ -15,7 +15,8 @@ process.nextTick(function() {
document
.getElementById("signup-form")
.addEventListener("click", function() {
.addEventListener("click", function(e) {
if (e.srcElement.nodeName === 'BUTTON') {
if (input_email && input_email.value) {
var is_valid = check_email(input_email.value)
if (is_valid) {
@ -23,7 +24,8 @@ process.nextTick(function() {
form.submit()
} else {
input_email.value = ''
alert("that doesn't look like an email address, please try again...")
alert("that doesn't look like an email address,\nplease try again...")
}
}
}
})

Loading…
Cancel
Save