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? Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.