How-to validation question

1/19/2010 5:31 pmEric Mittman

In the example that I posted only one is required to make it pass validation. I have experimented with a couple of different situations and it would not be so simple to ensure that you had selected no more than six of the available choices.

One way you could do this with the custom client side js would be to loop over all of the radio options and check for a value. If there is a value then add one to a counter variable. After you have looped over all of the radio options you would then check the counter to ensure that it is 6 or less. You can then present an alert to the user letting them know that more or less selections are required.

0

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.