# ############################################################################# # Question Mark Computing Perception # Copyright (c) Question Mark Computing Ltd. 1998 - 2000 # # scripts.format version 2.2.6 # script definitions # Last modified : 15th August 1999 (added support for Perception Secure Browser) # : 17th September 1999 # # : 22nd September - multiple choice ID Java applet support added to CheckApplets() # # : 17th December 1999 - updating for new multi HotSpot and Essay question types # - fixed bug in AllQuestionsAnswered() where last question was missed # - fixed bug in DoTimer(). Time left now calculated and doesn't rely on Javascript timer # - removed CheckReturn and use bFromButton (attached to DO_SUBMIT_BUTTON) to only allow # submit button to trigger submit (not return key in edit boxes etc) # # : 20th December 1999 - added DO_ESSAY script hook # : 10th January 2000 - changed checkNumber() to use text from text.format NOT_NUMERIC_TEXT # : 2nd february 2000 - fixed bug where when time limit has finished is shown as 0-1.0-1 # : 8th May 2000 - moved WriteList from BODY onload to end of document (in htmlcore.format) # : 30th May 2000 - modified DoSubmit() and DO_SUBMIT_BUTTON to prevent Enter key from submitting form in IE # : 8th June 2000 - add CheckReturn function to prevent Enter key from submitting form # : 16th August 2000 - now forcibly hides elements in WriteList # # ############################################################################# [DOCUMENT] # ########################################## # scripts used by questions # scripts placed at top of document SCRIPTS= %NO_JAVA% %BROWSER_DETECT% %CHECK_RETURN% %ON_SUBMIT% %REQUIRED% # ###################################### # script hooks # script placed in FROM tag called when form is submitted # execute java applet interface script DO_SUBMIT= _IF %USE_QXQ% = 1 onSubmit="return DoQxQSubmit();" _ELSE onSubmit="return DoSubmit();" # script placed in BODY tag called when document loaded # can also be used to embed multimedia calls etc DO_BODY= _IF %USE_QXQ% = 1 onKeyPress="checkReturn();" onSelectStart="noScroll();" onScroll="window.scroll(0,0);" _ELSE onKeyPress="checkReturn();" # script placed in FORM tag of feedback page, not normally used DO_FEEDBACK_SUBMIT= # script placed in FORM tag of final feedback page, not normally used DO_END_SUBMIT= # script attached to reset button DO_RESET_BUTTON= # script attached to continue button DO_CONTINUE_BUTTON= # script attached to home button DO_HOME_BUTTON= # script attached to end of session branching button DO_BRANCH_BUTTON= # script attached to end of session link DO_LINK_HREF= # script hooks to detect change DO_MC= _IF %USE_QXQ% = 1 onClick="DoChange(%QUESTION.NUMBER%,this);" DO_MR= _IF %USE_QXQ% = 1 onClick="DoChange(%QUESTION.NUMBER%,this);" DO_NUM=_IF %USE_QXQ% = 1 onKeyUp="DoChange(%QUESTION.NUMBER%,this);" onChange="checkNumber(this)" _ELSE onChange="checkNumber(this)" DO_TM= _IF %USE_QXQ% = 1 onKeyUp="DoChange(%QUESTION.NUMBER%,this);" DO_SEL= _IF %USE_QXQ% = 1 onChange="DoChange(%QUESTION.NUMBER%,this);" DO_FIB= _IF %USE_QXQ% = 1 onKeyUp="DoChange(%QUESTION.NUMBER%,this);" DO_HOT= _IF %USE_QXQ% = 1 onMouseout="DoJavaChange(%QUESTION.NUMBER%,'QMApplet%QUESTION.NUMBER%');" DO_MAT= _IF %USE_QXQ% = 1 onClick="DoChange(%QUESTION.NUMBER%,this);" DO_ESSAY= _IF %USE_QXQ% = 1 onKeyUp="DoChange(%QUESTION.NUMBER%,this);" # ###################################### # script wrapper for java-based (hotspot) questions with QxQ delivery # places a border round the applet # to detect when the cursor moves into or out of the applet area with onMouseout START_QUESTION_java= _IF %USE_QXQ% = 1
END_QUESTION_java= _IF %USE_QXQ% = 1
# ###################################### ON_SUBMIT= # ###################################### BROWSER_DETECT= # ###################################### # check the input box of a numeric question to check a number has been entered VALID_NUMBER= # ###################################### # base definition to trun off applet support NO_JAVA= # check if Javascript 1.1 is supported CHECK_SCRIPT_VERSION= # ###################################### # check any Java applets containing responses CHECK_APPLETS= # ###################################### # disable return key except in text edit boxes # prevents accidental submission of form by pressing return CHECK_RETURN= # ###################################### # timed session script INIT_TIMER= DO_TIMER= # ###################################### # Question by Question delivery script QXQ_SCRIPT= %QXQ_CORE% # include core QxQ script from file, or write to document QXQ_CORE= _IF %USE_SCRIPT_FILE% = 1 _ELSE