summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcgi-bin/cookies.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgi-bin/cookies.cgi b/cgi-bin/cookies.cgi
index 2e634d3..ec2ed4f 100755
--- a/cgi-bin/cookies.cgi
+++ b/cgi-bin/cookies.cgi
@@ -54,7 +54,10 @@ function getCookie(cname) {
if (counter === "") { counter = "0"; }
var uploaded_counter = uploaded_cookies["counter"] || "0";
document.write("<b>Cookie:</b> " + counter + "<br/><b>JSON:</b> " + uploaded_counter + "<br />");
- document.cookie = "counter=" + ((parseInt(counter) + 1).toString());
+ counter = parseInt(counter);
+ counter = counter + 1;
+ counter = counter.toString();
+ document.cookie = "counter=" + counter;
</script>
</body>
</html>