Your input tags need to include the following attributes:
type="text"
name="qX" – where X is the
question number
value=""
size="Y" – where Y is the
length of the text box. This should always allow enough space for the
entire word to be visible without horizontal scrolling
Questions must always be numbered sequentially
starting from 1. This does not mean that a question can't
be seen as 'question 1a' to the user. There is no double-up of question
numbers.
There is always one image per question.
Images must be named according to their question. For example, name="iq1"
– i means image, q1 is the question it's
attached to. Images should start as blank.gif with an empty
alt. The Javascript will change the image as appropriate.
It's preferable to link to a separate Javascript file although, for pages
individually loaded into Blackboard, including the script within the HTML
is acceptable.
There are three parts of the script that need to be modified:
Pre-loading of response image placeholders
Setting the question variables
Setting the response image variable paths
The response image placeholders must always start as blank.gif.
Only change the value for the number of images –
for (var i=1; i<=numberofimages; i++) {,
and adjust the path to blank.gif – eval("iq"+i+".src
= \"blank.gif\"");.
Set 2 new variables, one for the correct answers and one for the user
answers as arrays. The variables must appear as:
var answers = new Array("","answer","answer");
– where "answer" are the correct answer
strings. There must be as many answers as there are questions (text
boxes) in the exercise.
var users = new Array("","","");
– where "" are the placeholders for each
of the user's responses. There must be as many placeholders as there
are answers.
Example: var answers = new Array("", "edo",
"kyoto", "unity", "seclusion", "christianity",
"dutch", "nagasaki", "tokugawa");
var user = new Array ("","","","","","","","","");
Set the paths of the response image variables as needed. Do not
remove or rename these variables.
Below is the source code for the Javascript of the above example.