if ( !Array.prototype.filter.call( documnet.getElementsByName('imia'), function( elem ){ return elem.checked; } ).length ) { alert("Please, choose something!"); }