Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Random answer displayed, given a .txt file of answers

    Hey guys,

    I was wondering if anyone had an idea of how to create a random answer selector given a .txt file with all of answers (one per line) attached to it?

    Thanks and happy holidays!
    Last edited by spudmonkee; 12-24-2012 at 12:11 AM.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    What server side language are you using to read the txt file?
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Sep 2012
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I am using PHP . On further investigation I've found a solution - still a newbie so I wasn't sure whether or not it'd be possible through PHP thus making me turn to JavaScript . Thanks for your help!


  •  

    Posting Permissions

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