Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q97

Feedback on: irt.org FAQ Knowledge Base Q97

Sent by Andrew Winton on September 13, 2000 at 05:03:01: - feedback #1747

Worth:
Very worth reading

Comments:
It doesn't work properly! If you get all the answers right, it just clears the results boxes and returns you to the top of the page.

By trial and error, I think the problem is in the line:

if (correct != numberOfQuestions) return false; else return true;

After hacking about a bit (I know NOTHING about JavaScript!) I changed it to:

if (correct != numberOfQuestions) return false;
else if (wrong != numberOfQuestions) return false;
else return true;

... and that seemd to work.

I have no idea if this is correct (even if it works). Could you let me know?

Many thanks and congratulations on a great site!

Andrew.



Sent by Alan Mead on Saturday January 05, 2008 at 13:16:00 - feedback #5191

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
The script fails for two reaons. First, the action elment in the form tag should have an equals sign, >>action"mailto:someone@somewhere.com"<< should read >>action="mailto:someone@somewhere.com"<<.

And, in a real script, you would want a CGI script to accept the data and store it (or email it to you). When you fix the typo, your browser may, or may not, send an email because this is non-standard. And some users may have a chance to review and edit the contents of that email. So, a better example would be: >>action="/cgi-bin/save_results.cgi"<< would call a hypotetical CGI script called "save_results.cgi" located in the "/cgi-bin" directory.




©2018 Martin Webb