summaryrefslogtreecommitdiff
path: root/ws2a/bugview.js
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-09 16:12:59 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-09 16:12:59 -0400
commitbfb4f9159a849accfbe402aa971cdd0f0be76c10 (patch)
treec4d0b9366f8094d5ca2b9777da68f890c435470d /ws2a/bugview.js
parent4ba6f3e5ceed1bd7ff454fce96348e3b5c052b70 (diff)
downloadwebpage-bfb4f9159a849accfbe402aa971cdd0f0be76c10.tar.gz
webpage-bfb4f9159a849accfbe402aa971cdd0f0be76c10.tar.bz2
webpage-bfb4f9159a849accfbe402aa971cdd0f0be76c10.zip
More work on showing a bug
Diffstat (limited to 'ws2a/bugview.js')
-rw-r--r--ws2a/bugview.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/ws2a/bugview.js b/ws2a/bugview.js
index 4c8b007..2f9740f 100644
--- a/ws2a/bugview.js
+++ b/ws2a/bugview.js
@@ -1,11 +1,29 @@
+function getQueryStrings() {
+ var assoc = {};
+ var decode = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); };
+ var queryString = location.search.substring(1);
+ var keyValues = queryString.split('&');
+
+ for(var i in keyValues) {
+ var key = keyValues[i].split('=');
+ if (key.length > 1) {
+ assoc[decode(key[0])] = decode(key[1]);
+ }
+ }
+
+ return assoc;
+}
+
function loadLastBugs() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
- document.getElementById("bugstable").innerHTML = xhttp.responseText;
+ document.getElementById("longdesc").innerHTML = xhttp.responseText;
}
};
- xhttp.open("GET", "/cgi-bin/bugsdata.cgi", true);
+ var query = getQueryStrings();
+ var bugnum = qs["id"];
+ xhttp.open("GET", "/cgi-bin/showbug.cgi?id="+bugnum, true);
xhttp.send();
}
window.onload = loadLastBugs