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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript random function - help

    ***I need to randomise the order of some questions that are in this format. Any ideas? Thank you!***

    <CODE>

    <!---Question4--->

    <form name="form4" method="post" action="">

    <h3><p>First One</p></h3>

    <p>
    <label><input type="radio" name="q4" id="w1" value="1" </label>
    <label><input type="radio" name="q4" id="w2" value="2" </label>
    <label><input type="radio" name="q4" id="w3" value="2" </label>
    </p>

    </form

    </CODE>
    Last edited by Javalava; 05-01-2012 at 02:47 AM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    Well, pesonally I would do this via server-side code (PHP/ASP/JSP), since presumably you will be checking the answers via server-side code.

    But, yes, it can be done vis JavaScript. Just not as conveniently.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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