Forum Moderators: open

Message Too Old, No Replies

validation to check if any boxes ticked

         

kapow

3:44 pm on Mar 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a form with about 20 tick boxes and I need a simple validation to make sure people tick something. There are also some text input boxes on the form but it doesn't matter if they are used or not.

Can anyone tell me the JS to do this:

if (no boxes ticked) {alert 'You must select something'}

CaseyRyan

3:50 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



I just posted a javascript piece that does this:
http://www.webmasterworld.com/forum91/3330.htm [webmasterworld.com]

-=casey=-

kapow

5:13 pm on Mar 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks
I just put my reply in that thread too.