I figured out the missing ';', sorry about that. I found this function
in the archive and it works for alerting me that one of the radio sets
is not checked. Is there any way in the alert for it to tell me the
name, id, or rel attribute of the group that stopped the find?

        if(!$(this).find("[EMAIL PROTECTED]:checked").size()){
                alert( "All questions are required. Please check your entries." 
);
                return false;
        };

On Sep 4, 6:50 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Shaun,
>
> Try this, although it is untested:
>
> function validate_form (){
>         var valid = true;
>         for (var i=1, i<4, i++){
>                 if ( $(':checked',document.survey['question'+i]).length == -1 
> ){
>                         alert ( 'Please answer question #' + i );
>                         valid = false;
>                 }
>         }
>         return valid;
>
> }
>
> Joel Birch.

Reply via email to