diff options
author | John H. Anthony <johnhant@gmail.com> | 2010-09-04 23:39:01 +0200 |
---|---|---|
committer | John H. Anthony <johnhant@gmail.com> | 2010-09-04 23:39:01 +0200 |
commit | 1920c3b92b4852c467d35f44fc5913aeea39cf9d (patch) | |
tree | 08f4beb1815a1a12ba58ee1dc209f543589440d1 /html | |
parent | 059a7efa13ff4147385013b8c6b62e5345e33b3c (diff) |
enable voting for ViewQuotestability-improvements
Diffstat (limited to 'html')
-rw-r--r-- | html/quotes.jsp | 15 | ||||
-rw-r--r-- | html/vote.js | 10 |
2 files changed, 11 insertions, 14 deletions
diff --git a/html/quotes.jsp b/html/quotes.jsp index 0602276..bd2f1f7 100644 --- a/html/quotes.jsp +++ b/html/quotes.jsp @@ -31,20 +31,7 @@ hr { </pre> <hr> -<script> - -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); -} -</script> - +<script src="/vote.js"></script> <% 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); +} |