newbie question - how do you *require* a response?

Discussion in 'Javascript' started by Harlett O'Dowd, May 20, 2008.

  1. Please forgive this newbie question but java is new to me and I'm
    still trying to find a course in my area.

    I'm tweaking an online survey and have gotten it to display what I
    want but can't figure out how to *require* the surveyee to pick a
    choice.


    For each of ten questions, the surveyee is asked:


    _____________________________


    <select name="proposal1" size=1>
    <option>Please Choose one option from the list below</
    option>
    <option>Approve</option>
    <option>No Opinion</option>
    <option>Object - The technical approach is not sound</
    option>
    <option>Object - The proposed project duplicates previous
    and publicly reported efforts</option>
    <option>Object - the proposal is not needed</option>
    <option>Object - Other - you <strong>MUST</strong> give a
    detailed response ine 'Comments' box below: </option>
    </select>


    <TABLE>
    <tr>
    <td></td>
    <td width="500"> Comments:</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><textarea name=object-one rows=6 cols=80></textarea></td>
    </tr>
    </table>


    ______________________________________


    Ideally, I'd like to script this so that if the surveyee does NOT
    choose one of the select pull-down options (or, more to the point,
    allows the default option "Please Choose one option from the list
    below" to ride) when s/he hits submit later down the page, s/he gets
    an error message instructing the user to return to the form and enter
    the appropriate answer.


    AND,


    if at all possible, if the surveyee choices the final option -
    "Object
    - Other - you <strong>MUST</strong> give a detailed response ine
    'Comments' box below" - the user will go to the same error page
    requesting that s/he go back and fill in the comments section for
    this
    proposal (in cthis case, the 'object-one' box)


    I've doen some googling on this but haven't found anything that seems
    to be a reasonable starting-off model to use.


    Thanks in advance for your help


    HOD
     
    Harlett O'Dowd, May 20, 2008
    #1
    1. Advertising

  2. Harlett O'Dowd

    Stevo Guest

    Harlett O'Dowd wrote:
    > Please forgive this newbie question but java is new to me and I'm
    > still trying to find a course in my area.


    I don't recommend taking a course in Java. If you're tweaking an online
    survey, then you're more likely to find a course in JavaScript useful.
     
    Stevo, May 20, 2008
    #2
    1. Advertising

  3. Harlett O'Dowd

    Rich Grise Guest

    On Tue, 20 May 2008 05:42:41 -0700, Harlett O'Dowd wrote:

    > Please forgive this newbie question but java is new to me and I'm
    > still trying to find a course in my area.
    >
    > I'm tweaking an online survey and have gotten it to display what I
    > want but can't figure out how to *require* the surveyee to pick a
    > choice.
    >
    > For each of ten questions, the surveyee is asked:
    >
    > <select name="proposal1" size=1>
    > <option>Please Choose one option from the list below</
    > option>
    > <option>Approve</option>
    >
    > Ideally, I'd like to script this so that if the surveyee does NOT
    > choose one of the select pull-down options (or, more to the point,
    > allows the default option "Please Choose one option from the list
    > below" to ride) when s/he hits submit later down the page, s/he gets
    > an error message instructing the user to return to the form and enter
    > the appropriate answer.


    If you use radio buttons with "Please Choose..." as the default, it will
    already have been filtered - and if the answer is "Please Choose...", your
    script would send them back with an admonition.

    I've almost already got this one written in my head using perl/CGI
    but that's OT for the NG. ;-)

    Good Luck!
    Rich
     
    Rich Grise, May 21, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doris Cox
    Replies:
    0
    Views:
    562
    Doris Cox
    Dec 2, 2003
  2. Dennis
    Replies:
    0
    Views:
    706
    Dennis
    Dec 2, 2003
  3. Dennis
    Replies:
    0
    Views:
    463
    Dennis
    Dec 2, 2003
  4. Serg Koren

    Newbie question 'require'

    Serg Koren, Jan 29, 2008, in forum: Ruby
    Replies:
    5
    Views:
    118
    Markus Arike
    Jan 30, 2008
  5. Gerald Meazell

    Newbie question on require and semaphores

    Gerald Meazell, Dec 29, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    110
    Thomas Kratz
    Dec 30, 2004
Loading...

Share This Page