ASP and Javascript Quiz

A simple quiz program in ASP and JavaScript

I haven’t had the chance to write a proper tutorial for this page but here’s some code to get you started.

 Download the database, source code and images

21-nov-03: Re-wrote the quiz from scratch today. The “show answers” fuction didn’t work in Opera 5.x or NS4.x and the code was difficult to understand.

Now instead of changing background colours (which Opera 5.x doesn’t support and NS4.x usually chokes on) I have hidden graphics that show the user whether they are correct or not. As far as I know it works in all browsers.

If your web site doesn’t have ASP and database support, you can now configure the quiz quite easily using just javascript (the random generation doesn’t work however) to get the JavaScript-only version view the source of this sample page.

Preview Below:


1) What did Margaret Thatcher’s father do?
He was a tailor
He was a grocer
He was a banker
He was a farmer
 
2) Where would you expect to find a cloister?
In an inn
In a monastery
In a house
In a castle
 
3) In which year was “The Rumble in the Jungle” between Muhammad Ali and George Foreman?
1976
1970
1974
1972
 
4) Starsky & Hutch’s car was what colours?
White
Red with a Confederate flag on top
Red and white
Blue and white
 
5) Who was the last Briton to win the Formula One championship?
Nigel Mansell
Johnnie Herbert
David Coulthard
Damon Hill
 
6) What is a ‘capybara’?
A type of tree
A South American dish
A type of fish
The worlds largest rodent
 
7) ‘garderobe’ is the medieval name for a what?
wardrobe
cupboard
toilet
dressing room
 
8) What is the main purpose of putting hops in beer?
To colour it
To flavour it
To give it a smell
To preserve it
 
9) Which of these films was NOT directed by Orson Welles?
The Third Man
The Magnificent Ambersons
Touch of Evil
Citizen Kane
 
10) ‘Road To Nowhere’ was a hit for which band?
Thompson Twins
Talking Heads
Take That
Talk Talk
 

One thought on “ASP and Javascript Quiz

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>