diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2012-09-30 18:04:57 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2012-09-30 18:04:57 -0500 |
commit | 60c8232de409d0cb6de37ef87a489049f060003d (patch) | |
tree | 46fdb1be91eb3a4db354d064363a46fbf27fdb8b /js | |
parent | 2ce5e3800ff764870c93038d0c5ed35181225a52 (diff) | |
download | pathery-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')
-rw-r--r-- | js/mapspecs.js | 7 |
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();
}
|