[Proto-Scripty] Return From Each Loop

2010-04-14 Thread sporkit
I'm trying to validate that at least one checkbox of 4 has been selected. The code seems simple enough to me. function testRecipient() { var required = [dir, dev, pub, web]; required.each( function (name) { if ( $(name).checked == true )

Re: [Proto-Scripty] Return From Each Loop

2010-04-14 Thread DJ Mangus
What you probably want is other enumerable methods, such as http://www.prototypejs.org/api/enumerable/any On Apr 13, 2010, at 11:53 AM, sporkit minchuk.j...@gmail.com wrote: I'm trying to validate that at least one checkbox of 4 has been selected. The code seems simple enough to me.