[thelist] Javascript validation help....HELP!!

Michael Pack michaelpack at wvdhhr.org
Thu Aug 17 10:22:13 CDT 2006


(c) something else

I want an alert when the user has checked the Yes radio button, which
has a value of "Yes", but has not checked 1 or more of the checkboxes.

Thanks MW

>>> mwarden at gmail.com 8/17/2006 11:14:30 AM >>>
On 8/17/06, Michael Pack <michaelpack at wvdhhr.org> wrote:
> function get_Children_value()
> {
> for (var i=0; i < document.sfcp_inquiry.Children.length; i++)
>   {
>   if (document.sfcp_inquiry.Children[i].checked)
>      {
>      var Children_val = document.sfcp_inquiry.Children[i].value;
>      }
>   }
> }

Children_val is a local variable, scoped only within your if
conditional. Declare it outside the block. Also, you have some logic
issues, but I can't fix them because I'm not sure exactly what you're
trying to do.

You want an alert when:
(a) any of the checkboxes is yes and no age group is checked?
(b) a checkbox and its matching age group is not checked?
(c) something else?

-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com 


This email proudly and graciously contributes to entropy.
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/ 

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list