summaryrefslogtreecommitdiff
path: root/src/data/templates/quotes.hbs
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/templates/quotes.hbs')
-rw-r--r--src/data/templates/quotes.hbs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/data/templates/quotes.hbs b/src/data/templates/quotes.hbs
index 0e38d22..45fa711 100644
--- a/src/data/templates/quotes.hbs
+++ b/src/data/templates/quotes.hbs
@@ -31,6 +31,18 @@
-moz-user-select: text;
}
</style>
+ <script type="text/javascript">
+ 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>
</head>
<body>
@@ -59,8 +71,7 @@ Dato: {{date}}, Score:
<a href="javascript:vote({{id}},2)">2</a>
<a href="javascript:vote({{id}},3)">3</a>
<a href="javascript:vote({{id}},4)">4</a>
- <a href="javascript:vote({{id}},5)">5</a>
- </font></span>,
+ <a href="javascript:vote({{id}},5)">5</a></font></span>,
<form method="post" style="display: inline;"action="http://www.vidarholen.net/contents/rage/index.php"><input type="hidden" name="irc" value="{{content}}"/><input type="submit" class="ragebutton" value="Rage it"/></form><br>
<br> <br>