Thread: Form Problems

    #1
  1. No Profile Picture
    Harbinger
    Guest
    Devshed Newbie (0 - 499 posts)
    I just finished making a JavaScript quiz. It made the default answer "A" in the form so the user couldn't enter an undefined answer. Now, I am trying to make it so there is no default answer, and if the user doesn't answer the question, a pop-up window will appear informing the user that he/she didn't answer howevermany questions. The only problem is that I can't figure out how to test the form to see if one of the answers is undefined. I tried:
    if (document.answers.elements[i] == ""), and
    if (!document.answers.elements[i].checked), but those didn't work. Any help on this matter would be greatly appreciated.
  2. #2
  3. No Profile Picture
    scollo
    Guest
    Devshed Newbie (0 - 499 posts)
    Is "answers" the name of your form?

    Try:

    document.answers.elements[i].value == ""

Similar Threads

  1. form/ perl problems
    By s-e-z in forum Perl Programming
    Replies: 6
    Last Post: August 10th, 2003, 01:22 PM
  2. Concatination problems with form variables
    By don_sparko in forum ASP Programming
    Replies: 2
    Last Post: August 7th, 2003, 10:45 AM
  3. Having problems with explode, multi select form
    By Ted Striker in forum PHP Development
    Replies: 2
    Last Post: April 11th, 2002, 10:26 PM
  4. Dynamically generated form and Update problems
    By Pete_Simard in forum PHP Development
    Replies: 5
    Last Post: March 29th, 2002, 12:14 PM
  5. show form problems
    By xpedwalkx in forum PHP Development
    Replies: 12
    Last Post: February 18th, 2001, 11:56 PM

IMN logo majestic logo threadwatch logo seochat tools logo