Hello everyone, I'm knew to all this and don't know the first thing about (java/Javascripting/ASP/. So was wondering if there was a kind soul in here that could help me out. I have just produced my first website for a driving instructor friend of mine.
on the site there is 6 theory tests. with 35 questions to each test.
I was wondering if there was a script that would allow me to only let the user go onto the next test if they had completed the number of points needed to pass the test they are completing?
I.e there's 35 questions the user needs to score 30 correct to pass that test.
what I wanted to do is if the score is 29 or less they won't be able to go onto the next test. And if they score 30 or more this then gives them a password to get to the next test... at the end of the test. Does this make sense? Hope someone could help me out here....Many Thanks in advance for any assistance you can give. Regards Tony.
hi,
Tony this can be done 2 ways. First way using server-side scripting such as ASP or client-side using JavaScript. Personally i would do this using server-side scripting using ASP. If you decide to go server-side with this then you would need a database to store your questions, answer and results. You would have your page build the questions on-the-fly, then when submitted the answers given are cross referenced witht he answers in the database and the correct answers are totaled up, the the user is redirected to the correct page. On the JavaScript side maybe Dave Clark can help you with this.
Anyway post back which way you would like to do this and then we can go from there.
Hi Thanks for the quick reply. as I said, I know nothing about scripting at all, so I would also need help in putting on the site? Anyway would be okay but I would need help in explaining in Basic terms how I would apply it to the site....
hi,
do you have your questions all ready?
Are all the questions multiple chose?
Is yes then how many answers per question?
does the amount of answers vary for every question?
Are the questions going to change at any time?
Do you want to store the results anywhere?
Does the user get a copy of the answers he/she submitted?
This may sound an easy task but it would take a lot of coding. The best way to approach this is to think about the questions about. Then if you decide to do this server-side then you need to get your database ready for your questions and answers.
If you do decide to use a database just let me know and i will give you a normalized table structure for you to work with. You would need to find out which database will suit you best for this task, maybe you are already using one for the site.
hi,
looked at your site, sorry for not doing earlier. I don’t get what you need. I did part of the test and your JavaScript looks like its working fine.
The only thing is if you did this with ASP it would be very complex but you would possible be about to do all the tests from 1 or 2 pages. If you would like us to see what happens when we get 30 out of 35 please can you post the answers to the questions because that was too much trying to answer them, lol.
Well when you finish the test at the moment. there is just a popup message saying how many you scored out of 35.
But you can do all six tests even if you don't pass them. What I wanted to do is only let them do the next test once they have passed the previous one. Make any sense? Or do you think it would be to much hassle doing this???
Bookmarks