summaryrefslogtreecommitdiffstats
path: root/js/mapspecs.js
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2012-09-30 18:04:57 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2012-09-30 18:04:57 -0500
commit60c8232de409d0cb6de37ef87a489049f060003d (patch)
tree46fdb1be91eb3a4db354d064363a46fbf27fdb8b /js/mapspecs.js
parent2ce5e3800ff764870c93038d0c5ed35181225a52 (diff)
downloadpathery-60c8232de409d0cb6de37ef87a489049f060003d.tar.xz
Did some more work on the challenges, to have them added to the DB when the user actually completes them. No idea if it actually works yet :)
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r--js/mapspecs.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index ded7bfc..30a8ec7 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -20,7 +20,6 @@ else if (document.attachEvent) { // IE 8-
}
var isChallenge = false;
-var challengeID = false;
var solution = new Array();
var blocks = new Array();
@@ -188,11 +187,13 @@ function doSend(mapid) {
pressedGoTime = new Date().getTime();
- reqstr = "&mapcode="+mapdata[mapid].code;
+ reqstr = "isChallenge="+isChallenge
+ reqstr += "&r=getpath"
+ reqstr += "&mapcode="+mapdata[mapid].code;
reqstr += "&mapid="+mapid;
reqstr += "&solution="+solution[mapid];
- ajax.requestFile = "do.php?challengeID="+challengeID+"&isChallenge="+isChallenge+"&r=getpath"+reqstr; //prepare strdata
+ ajax.requestFile = "do.php?"+reqstr; //prepare strdata
ajax.onCompletion = request_path_done; // specify function to be executed on response
ajax.runAJAX();
}