summaryrefslogtreecommitdiff
path: root/html/vote.js
diff options
context:
space:
mode:
authorJohn H. Anthony <johnhant@gmail.com>2010-09-04 23:39:01 +0200
committerJohn H. Anthony <johnhant@gmail.com>2010-09-04 23:39:01 +0200
commit1920c3b92b4852c467d35f44fc5913aeea39cf9d (patch)
tree08f4beb1815a1a12ba58ee1dc209f543589440d1 /html/vote.js
parent059a7efa13ff4147385013b8c6b62e5345e33b3c (diff)
enable voting for ViewQuotestability-improvements
Diffstat (limited to 'html/vote.js')
-rw-r--r--html/vote.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/html/vote.js b/html/vote.js
new file mode 100644
index 0000000..90811e0
--- /dev/null
+++ b/html/vote.js
@@ -0,0 +1,10 @@
+function vote(id, value) {
+ var http = new XMLHttpRequest();
+ http.open("GET","/vote?id="+id+"&vote="+value);
+ http.onreadystatechange=function() {
+ if(http.readyState==4) {
+ document.getElementById("v"+id).innerHTML = http.responseText;
+ }
+ }
+ http.send(null);
+}