PDA

View Full Version : JavaScript Multiple Choice Quiz - can I email results?


garycc
08-15-2002, 07:18 PM
I am using the Cut & Paste JavaScript Multiple Choice Quiz as posted by "George".

http://javascriptkit.com/script/cut180.shtml

I can include the script if it will help ( it is long). It basically consists of three files:
-popquiz.htm (Edit this file to change the questions on the page to your own)
-results.htm (Do NOT edit this file)
-solution.js (Edit this file to change the solutions to your own)

On popquiz.htm the end user clicks on the appropriate radio button to answer each question. At the end he clicks "submit" which grades it using solution.js and displays the results.htm.

I would like to email a copy of the results.htm to a specific person. Can this be done? When I tried to add the action="mailto:.." it did nothing.

Is there a way? I will include the source if anyone wants to see it.

Thanks
garycc

beetle
08-15-2002, 10:50 PM
Not sure about the email thing, but that quiz was erroneous. I could submit the same form data and get a different score each time. That sucker is busted.

garycc
08-16-2002, 06:14 AM
Thanks for the heads up beetle.
Do you know of a script that will create a quiz, grade it and allow email?

beetle
08-16-2002, 06:24 AM
I don't know of any, but I could code one (sorry, don't have the time now :( )

ihitman
08-16-2002, 10:05 AM
You could use a server side script to email you the results. You'd need your own domain most likely but all you'd need to do is enclose the popquiz.htm questions in a form and change the results.htm to results.asp and then grab the answers in that.

ih.

garycc
08-16-2002, 01:39 PM
Ok,

I am going to try and do this myself. I can create the form fairly easily. I have created asp pages before, but only with the help of a somewhat similar tutorial. Do you know of a site or book that will point me in the correct direction?

Thanks

ihitman
08-16-2002, 01:48 PM
http://www.asp101.com/
http://www.4guysfromrolla.com/

ih.