Your input tags need to include the following attributes:
type="radio"
name="qX" – where X is the
question number
value="Y" – where Y is the
option number
id="qXY" – where X is the
question number and Y is the option
number (double digits for numbers <10)
onClick="checkRadio(this.name, this.value)"
Questions must always be numbered sequentially starting
from 1 and should avoid numbering such as q1a, q1b, etc. unless you are
prepared to make major adjustments to the Javascript yourself. This does
not mean that a question can't be seen as 'question 1a'
to the user.
The number of options depends on the type of question.
In the example above there are two options per question.
Option 1 is True and option 2 is False. Options must always be numbered
sequentially starting from 1 for each question.
The option label should be attached to its input via the label
tag. The label tag includes the attribute for="qXY"
– the same value as the id of the input.
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 a new variable for each question as a string. The variables must
appear as:
var vqX = "Y"; – where X
is the question number and Y relates to
the option number of the correct answer.
With 'true or false' there are only ever two options.
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.