View Full Version : [Help] Javascript Quiz
mamamiaw
07-29-2008, 07:11 AM
Dear all,
Firstly thanks for reading this post. I have couple questions n problems to solve, and i believe all the masters and gurus here are kind enough to help me. I am not a programmer, nor that i'm experience with jscript. But i have this task or challenge to create a quiz for my class (i'm a part time teacher).
I have tried it on flash but i'm still finding another solution, which i think is easier, that is jscript.
I believe most of you know or ever heard the "who wants to be a millionaire" quiz. Basically what i'm tryin to create is quite similar to that. The only differences are:
1. There are 8 question before you finally win the game, and on question 5,6,7,8, there're certain prizes if they can answer it correctly (ex. if a contestant answer rightly question number 5, they will win prize A, and may continue to next question, which is question number 6, if he/she failed to answer number 6, he/she only win prize A)
2. Every question (1-8) is considered set, where every set consisted of 8-10 questions where the question on every session/game appears randomly (picked/generated randomly)
3. Every time a contestant wins a prize there will be sound played on.
4. There will be background music played on this quiz.
So is it possible to create those?, if yes can anybody enlighten me here?
Here enclosed the layout picture of what the quiz will appear.
Anyway, again thanks for reading, and thanks in advance for kindly answering.
Best regards
To insert background music into your page is simple. Use HTML:
<embed src="backgroundMusic.wav" loop="true" />
Find more info here:
http://www.quackit.com/html/html_music_code.cfm
Medyman
07-29-2008, 01:52 PM
Dear all,
Firstly thanks for reading this post. I have couple questions n problems to solve, and i believe all the masters and gurus here are kind enough to help me. I am not a programmer, nor that i'm experience with jscript. But i have this task or challenge to create a quiz for my class (i'm a part time teacher).
I have tried it on flash but i'm still finding another solution, which i think is easier, that is jscript.
I believe most of you know or ever heard the "who wants to be a millionaire" quiz. Basically what i'm tryin to create is quite similar to that. The only differences are:
1. There are 8 question before you finally win the game, and on question 5,6,7,8, there're certain prizes if they can answer it correctly (ex. if a contestant answer rightly question number 5, they will win prize A, and may continue to next question, which is question number 6, if he/she failed to answer number 6, he/she only win prize A)
2. Every question (1-8) is considered set, where every set consisted of 8-10 questions where the question on every session/game appears randomly (picked/generated randomly)
3. Every time a contestant wins a prize there will be sound played on.
4. There will be background music played on this quiz.
So is it possible to create those?, if yes can anybody enlighten me here?
Here enclosed the layout picture of what the quiz will appear.
Anyway, again thanks for reading, and thanks in advance for kindly answering.
Best regards
It's possible. Certainly not easy, though. To make any kind of robust implementation of this, you'll need to use some sort of server side script (or I guess text files can also do) and Ajax. Otherwise, a simple view source might ruin the whole thing.
From scratch, I wouldn't know where to start. But this seems like a perfect job for jQuery (http://jquery.com/).
TimeTracker
07-31-2008, 08:27 AM
Just a suggestion. I found James Crooke's multi-quiz JS script quite user friendly. The link below is a modified version, but could be made to do the sorts of things you are seeking. http://www.hollmen.dk/content/view/62/31/
mamamiaw
08-04-2008, 06:04 PM
Hi for this quiz
There will be no ask the audience or phone a friend?
This game will be a Pure javascript , played offline.
The contestant (the student) will only see the screen, they're not allowed to have keyboard or mouse.
Anyway, here i upload the thing that i create...to explain the situation.
DOWNLOAD HERE (http://www.lajusaja.com/quizhelp.zip)
As u can see...on the javascript file (millquest.js) , i only manage to create a set....
which are:
stemarray[0] ='Monas adalah singkatan dari:'
answer[0] ='B'
adistract[0] ='Monumen Naskah'
bdistract[0] ='Monumen Nasional'
cdistract[0] ='Museum Nasional'
ddistract[0] ='Museum Naskah'
...all till number 7
But what i want to create are:
for question number 1-3 (which the contestant will win 100 point to Hadiah A), they consist of 75 questions that will be
randomly displayed each time the quiz begin
for question number 4-5 (which the contestant will win 100 point to Hadiah B), they consist of 75 questions that will be
randomly displayed each time the quiz begin
for question number 6 (which the contestant will win 100 point to Hadiah C), they consist of 75 questions that will be randomly
displayed each time the quiz begin
for question number 7 (which the contestant will win 100 point to Hadiah D), they consist of 75 questions that will be randomly
displayed each time the quiz begin
for question number 8 (which the contestant will win 100 point to Hadiah E), they consist of 75 questions that will be randomly
displayed each time the quiz begin
So.....anyone interested to help? ^_^
Thanks in advance...
best regards...
Jesdisciple
08-04-2008, 06:56 PM
For this thread's completeness, here's the random component: http://www.dynamicdrive.com/forums/showthread.php?t=35081
I don't understand why you repeat this exact string for different questions... Do only those questions draw on those separate 75-question compartments?
for question number x-y (which the contestant will win 100 point to Hadiah A), they consist of 75 questions that will be randomly
displayed each time the quiz beginAlso, what's Hadiah A? Does each question win 100 points or only each set?
stemarray[0] ='Monas adalah singkatan dari:'
answer[0] ='B'
adistract[0] ='Monumen Naskah'
bdistract[0] ='Monumen Nasional'
cdistract[0] ='Museum Nasional'
ddistract[0] ='Museum Naskah'Why are the possible answers to each question not all in the same array?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.