Hi all ...

It's me again ... I want to validate some radio buttons ... Each group has to have one value atleast ... and there should only be 1 warning per group...

I've been searching the web and the best so far is right from here ... but it only needs a little nudge to get the error message back to one line per group... this is what I got:

PHP Code:

    
function validateRadio(group
    { 
     var 
valid=false
     for(var 
0group.lengthx++) 
     {
      if (
group[x].checked
      { 
       
valid true
      } 
     } 
     if(!
valid
     { 
      return 
group.name
     }
     else
     {
      return 
valid
     } 
     } 
     
     function 
validateAllRadios(f
     { 
     var 
el f.elements
     var 
message ''
     for(var 
0el.lengthy++) 
     { 
      if(
el[y].type=='radio' && validateRadio(el[y])!=true
      {
       
message += validateRadio(el[y]) + "\n"
      } 
     } 
     if (
message!=''
     { 
      
alert('The following questions must be answered:\n\n' message '\nPlease check your entries and try again!'); 
      return 
false
     }
    } 
Thanks for the help ...