radio button validation - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

radio button validation

drpagaldrpagal Posts: 1Member
Currently without any javascript if a user does not select a radio button, it goes to a Coldfusion error page. Someone before me wrote the actual page and I, of course, needs to fix it. So i'm trying to add the following javascript and still goes to the cf error page. Any help would be great!

function validate()
var a = document.getElementById('Abstract');
var b = document.getElementById('Book');
var c = document.getElementById('Paper');
var d = document.getElementById('Presentation');
var e = document.getElementById('Oral');
var f = document.getElementById('Journal');
var g = document.getElementById('Public');
var h = document.getElementById('Internal');
var i = document.getElementById('Good');
if ( (a.checked == false )
&& (b.checked == false )
&& (c.checked == false )
&& (d.checked == false )
&& (e.checked == false )
&& (f.checked == false )
&& (g.checked == false )
&& (h.checked == false )
&& (i.checked == false ) )
alert ( "Please Choose Document Type" );
return false;
return true;




Sign In or Register to comment.