From 60c8232de409d0cb6de37ef87a489049f060003d Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sun, 30 Sep 2012 18:04:57 -0500 Subject: 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 :) --- js/mapspecs.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/mapspecs.js') 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(); } -- cgit v1.2.3