Results 1 to 6 of 6

Thread: [Help] Javascript Quiz

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default [Help] Javascript Quiz

    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

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    To insert background music into your page is simple. Use HTML:
    Code:
    <embed src="backgroundMusic.wav" loop="true" />
    Find more info here:
    http://www.quackit.com/html/html_music_code.cfm
    Jeremy | jfein.net

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by mamamiaw View Post
    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.

  4. #4
    Join Date
    Mar 2007
    Posts
    51
    Thanks
    18
    Thanked 1 Time in 1 Post

    Default

    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/

  5. The Following User Says Thank You to TimeTracker For This Useful Post:

    mamamiaw (08-04-2008)

  6. #5
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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


    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...
    Last edited by mamamiaw; 08-04-2008 at 07:00 PM.

  7. #6
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    For this thread's completeness, here's the random component: http://www.dynamicdrive.com/forums/s...ad.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 begin
    Also, what's Hadiah A? Does each question win 100 points or only each set?

    Code:
    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?
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •