Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

JavaScipt Question

  • 27-01-2004 05:39PM
    #1
    Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭


    Hi all.

    I've written a JavaScript file that will calculate the score that a person got on an online quiz that was written in HTML using forms (similar to The Spark). That's all well and good, but I'm wondering is it possible to save the results of the quiz on the website, so that you can see what was the distribution of scores?

    To see an the Javascript file I'm talking about, go here

    Can I do this in JavaScript? Or do I have to do it in another language?


Comments

  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    You need some other language to do that. PHP or a CGI PERL script are perhaps the most commonly supported. First you need to find out if the webserver supports them, then you need to write a script that will save the results either to a database, or (more probably) a text file, for another script to read/display.

    HTH
    .cg


  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    Yeah, you're probably thinking of a page that shows the person their score, and asks for their name.

    So you just have a form with a textbox, and a hidden field that's their score, and then a submit button that hands these two pieces of info over to another page, PHP/Perl/Jsp/Whatever which then writes the name and score to a db or text file.


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    Thanks. I don't really care too much about the name, more the score so I can get a statistical spread. As for the webserver supporting this, it's a college net society and i know some commity members, so maybe, but i haven't looked into it.


  • Closed Accounts Posts: 115 ✭✭boomdogman


    can I post a v. short javascript here which was suppose to swap images in continuous roation but just causes a stack overload instead. Twill be just text, wont harm any ones computer! Could do with help!


  • Registered Users, Registered Users 2 Posts: 3,890 ✭✭✭cgarvey


    Syth, yeah more than likely the webserver at least supports PERL CGI.

    boomdogman, sure .. but you might get a better response starting a new thread.

    .cg


  • Advertisement
Advertisement