From 93b4558b273d68cbabec93bc4ca6861fa59afaa9 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 30 Sep 2017 08:46:46 -0400 Subject: [PATCH] reset values --- contrib/static/overchan.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/static/overchan.js b/contrib/static/overchan.js index 9266407..aa14d91 100644 --- a/contrib/static/overchan.js +++ b/contrib/static/overchan.js @@ -90,6 +90,7 @@ onready(function() { } if(ajax.status == 201) { // success + form.reset(); cb(null, j); } else if (ajax.status == 200) { cb(err, j); @@ -116,6 +117,12 @@ onready(function() { e.disabled = true; e.innerHTML = "posting "; submitPost(document.forms[0], e, function(err, j) { + if(err) { + var captcha = document.getElementById("captcha_solution"); + if(captcha) { + captcha.value = ""; + } + } var msg = err || "posted"; console.log(msg, j.url); e.innerHTML = msg;