RE: Form validation problem.

by "Charlton, Mark" <Mark.Charlton(at)saint-gobain.com>

 Date:  Thu, 26 Apr 2001 21:09:35 -0400
 To:  "'Mike Taylor'" <lonewolf(at)one.net>,
hwg-languages(at)hwg.org
  todo: View Thread, Original
I would suggest that you have 5 radio button groups.  GRoup 1, group 2, ...
group 5.

Set up like this:

<.h1>Q1) Best colour for tomato soup<./h1>

RED  
<.input type=radio name='Q1 Rank 1' value=red>
<.input type=radio name='Q1 Rank 2' value=red>
<.input type=radio name='Q1 Rank 3' value=red>
<.input type=radio name='Q1 Rank 4' value=red>
<.input type=radio name='Q1 Rank 5' value=red>

GREEN
<.input type=radio name='Q1 Rank 1' value=red>
<.input type=radio name='Q1 Rank 1' value=red>
<.input type=radio name='Q1 Rank 1' value=red>

-----Original Message-----
From: Mike Taylor [mailto:lonewolf(at)one.net]
Sent: Thursday, April 26, 2001 7:16 PM
To: hwg-languages(at)hwg.org
Subject: Form validation problem.



Completely stumped on how to do this in Javascript:

I've got a survey question that has five items.  We want the customer to
rank these five items, 1 through 5, 1 being "most important" all the way
down to 5 being "least important." 

Problem is we don't want them to rank any of the five the same
number.  They all must have a unique rank, so that it's a true ranking of
1-5, not all 1's, or two 2's, etc.

I can't think of a way to check for this easily.  As a <select>, I'd have
to compare the values of all five items every time a new item is
selected.  If I choose radio buttons, then they all have to have the same
name assigned to them, but yet they are different answers so they can't
have the same name...

Any ideas on how to approach this peculiar validation request?

Thanks.

Mike

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.