summaryrefslogtreecommitdiff
path: root/ws2a/bugview.js
diff options
context:
space:
mode:
Diffstat (limited to 'ws2a/bugview.js')
-rw-r--r--ws2a/bugview.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ws2a/bugview.js b/ws2a/bugview.js
index 0f1d5c6..60ffb11 100644
--- a/ws2a/bugview.js
+++ b/ws2a/bugview.js
@@ -71,5 +71,14 @@ function loadLastBugs() {
var bugnum = query["id"];
xhttp.open("GET", "/cgi-bin/showbug.cgi?id="+bugnum, true);
xhttp.send();
+ var captcha = new XMLHttpRequest();
+ captcha.onreadystatechange = function() {
+ if (captcha.readyState == 4 && captcha.status == 200) {
+ var imgname = xhttp.response;
+ document.getElementById("captchaimg").innerHTML = "<img src=\"./captchas/" + imgname + ".png";
+ }
+ };
+ captcha.open("GET","/cgi-bin/gencaptcha.cgi",true);
+ captcha.send();
}
window.onload = loadLastBugs