diff --git a/html/assets/css/squatconf.css b/html/assets/css/squatconf.css
index be34be3..822f364 100644
--- a/html/assets/css/squatconf.css
+++ b/html/assets/css/squatconf.css
@@ -12,6 +12,8 @@
margin-left: -5px;
}
.input{width: 100%;}
+#status-msg.info{color: black}
+#status-msg.error{color: red}
/*mq madness*/
.maxW, .dskW,.tblW{display:none;}
@@ -28,4 +30,4 @@
@media (max-width: 979px) {
.tblW{display:block;}
}
-@media (min-width: 980px) {}
\ No newline at end of file
+@media (min-width: 980px) {}
diff --git a/html/index.html b/html/index.html
index 89db0d2..53ad850 100644
--- a/html/index.html
+++ b/html/index.html
@@ -34,6 +34,7 @@
Paris Nov.2014?
+
diff --git a/src/email.js b/src/email.js
index 5a91052..05f8187 100644
--- a/src/email.js
+++ b/src/email.js
@@ -6,6 +6,7 @@ process.nextTick(function() {
var form = document.getElementById('signup-form')
, input_email = ''
+ , status_msg = document.getElementById('status-msg')
for (var n = 0, l = form.childNodes[1].childNodes.length; n < l; n++) {
var el = form.childNodes[1].childNodes[n]
@@ -20,11 +21,16 @@ process.nextTick(function() {
if (input_email && input_email.value) {
var is_valid = check_email(input_email.value)
if (is_valid) {
- alert('got it, thanks '+ input_email.value)
- form.submit()
+ status_msg.className = 'info'
+ status_msg.innerHTML = "Got it, thanks"
+ setTimeout(function() { form.submit() }, 600)
} else {
input_email.value = ''
- alert("that doesn't look like an email address,\nplease try again...")
+ e.preventDefault()
+ status_msg.className = 'error'
+ status_msg.innerHTML = "that doesn't look like an email address,"
+ + "
please try again..."
+ setTimeout(function() { status_msg.innerHTML = ' ' }, 2000)
}
}
}