X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=includes%2Fajax.js;h=bc51be3ccd4163b40bdab49ef2d331de886a20cd;hb=c30849c73508b5a0168b6559b9935115186a20c7;hp=2bc9ccef6f116653aa8093672e6a9353f61d4574;hpb=6800ac4d1b7c2090630a149d1b9789679d338911;p=dylansserver.git
diff --git a/includes/ajax.js b/includes/ajax.js
index 2bc9cce..bc51be3 100644
--- a/includes/ajax.js
+++ b/includes/ajax.js
@@ -15,6 +15,7 @@ $(document).ready(function() {
var name = $("#comment_name").val();
var email = $("#comment_email").val();
var text = $("#comment_text").val();
+ if (name == '') { name = "anon" }
var comment_data = { "captcha" : "passed",
"name" : name,
"email" : email,
@@ -35,7 +36,8 @@ $(document).ready(function() {
}
});
} else {
- console.log('reCAPTCHA said you\'re not human.');
+ var error = "reCAPTCHA said you're not human";
+ $('#comment').append(error);
}
},
error: function() {
@@ -46,7 +48,8 @@ $(document).ready(function() {
}
});
} else {
- console.log('but you didn\'t write anything!');
+ var error = "but you didn't write anything!
";
+ $('#submit').before(error);
}
return false;
});