I am writing a simple online quiz application in struts .I take answers from users in radio boxes.There is a client side validation in JS to prompt the user in case he/she leaves any question unanswered.The problem is the form is getting submitted as soon as it enters the JS from my JSP. In my jsp i loop through the beans to get options entered for each of the question.In my jsp i have commented in the line where the problem lies.Kindly help me to get a solution.
var blankquestion=new Array();
var toadd="please enter answers for";
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.
Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.