jeeva Posted March 6, 2007 Share Posted March 6, 2007 his frnds, i have a survey form.In that i need to validate the radio button.For that i have coded one javascript code but its not working properly. its keep telling the the alert message even if the answer are checked here that code function validate(formname) { for (var i = 1; i <= formname.numQtns.value; i++) { radioGroup = document.getElementById('Q' + i); if(!radioGroup.checked){ alert('Please answer all questions before submitting.'+i); return false; } } can u tell me wts the problem with this code? Link to comment https://forums.phpfreaks.com/topic/41405-wts-the-problem/ Share on other sites More sharing options...
JasonLewis Posted March 6, 2007 Share Posted March 6, 2007 erhem, could you please read the title of this board? please? it would help a lot... Link to comment https://forums.phpfreaks.com/topic/41405-wts-the-problem/#findComment-200567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.