From d7f38c4e3709989f010aecfd75147cd863b6b884 Mon Sep 17 00:00:00 2001 From: Kaleb Murphy Date: Wed, 21 May 2008 15:58:25 +0000 Subject: [PATCH] Removed auto-submit on 1 MC question per page. Added scroll to top of page on submit. --- www/extras/wobject/Survey/administersurvey.js | 6 ++++-- www/extras/wobject/Survey/administersurvey/comm.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/extras/wobject/Survey/administersurvey.js b/www/extras/wobject/Survey/administersurvey.js index 598c16be9..f28f7f55e 100644 --- a/www/extras/wobject/Survey/administersurvey.js +++ b/www/extras/wobject/Survey/administersurvey.js @@ -23,7 +23,7 @@ Survey.Form = new function() { var sliders; - this.submittimer; +// this.submittimer; this.displayQuestions = function(params){ @@ -374,7 +374,7 @@ Survey.Form = new function() { var qsize = objs[4]; var aid = objs[5]; max = parseFloat(max); - clearTimeout(Survey.Form.submittimer); +// clearTimeout(Survey.Form.submittimer); if(maxA == 1){ if(b.className == 'mcbutton-selected'){ document.getElementById(b.hid).value = 0; @@ -415,11 +415,13 @@ Survey.Form = new function() { // document.getElementById(qid+'max').innerHTML = parseFloat(max+1); document.getElementById(b.hid).value = ''; } +/* if(qsize == 1 && b.className == 'mcbutton-selected'){ if(! document.getElementById(aid+'verbatim')){ Survey.Form.submittimer=setTimeout("Survey.Form.formsubmit()",500); } } +*/ } }(); diff --git a/www/extras/wobject/Survey/administersurvey/comm.js b/www/extras/wobject/Survey/administersurvey/comm.js index f4ceee030..95facaabd 100644 --- a/www/extras/wobject/Survey/administersurvey/comm.js +++ b/www/extras/wobject/Survey/administersurvey/comm.js @@ -29,6 +29,7 @@ Survey.Comm= new function(){ this.callback = { + window.scrollTo(0, 0); upload:function(o){ callMade = 0; Survey.Comm.callServer('','loadQuestions');