<nu***********@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Hello, I have a simple Web Page Questionairre in which questions are
read from a database, and the user can indicate the correct answer via
either a radio input control or a dropdown list. The number of
questions that is displayed on the screen can vary...depending on the
number of questions that satisfy certain criteria. Does anyone have
any sample code, or can show me how I can validate this Web Page in
JavaScript so that the user is forced to "answer" every question on the
form (whether it is a radio control or dropdown list). Thanks.
Add a radio button to each question - selected - "Don't Know"
Then it is selected on startup and the user must select a different radio
button - or get it wrong.
For a javascript quiz, one idea is to put each question in a separate form.
The script to grade the quiz could iterate thru the forms array to check if
the correct answer was selected.
The set up some variables
var a = 0;
var b = 1;
var c = 2;
var d = 3;
var e = 4;
Then set up the 'right answer array key'
var rightAns = new Array (a,c,d,b,a,b,a,c,a,d,b,a,);
.....
hth