Hi I am new in javascript Below is my jsp code and on click of submit button I want to force a user to select at least one radio box/record. how do I perform this task.
Thanks in advance.
<body>
<form:form id="myForm" action="actionValue" method="GET">
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for Excel Names.." title="Type in a name">
<table id="myTable">
<tr class="header">
<th>Select</th>
<th>Excle SrNum</th>
<th>Excle Name</th>
<th>Uploded By</th>
<th>UplodedBy ID</th>
<th>Uplod Date and Time</th>
<th>xml Genrated ?</th>
<th>xml Genration Date and Time</th>
<th>Action</th>
</tr>
<c:forEach items="${UploadFileModel}" var="UploadFileModel">
<tr>
<td><input type="radio" name="select" value= "${UploadFileModel.srNum}" id="radioButton"/></td>
<td>${UploadFileModel.excleSrNum}</td>
<td>${UploadFileModel.fileName}</td>
<td>${UploadFileModel.uplodedByName}</td>
<td>${UploadFileModel.uplodedByNum}</td>
<td><fmt:formatDate value="${UploadFileModel.uplodeDateTime.time}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${UploadFileModel.xmlGenrated}</td>
<td><fmt:formatDate value="${UploadFileModel.xmlGenrationDateTime}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><input type = "submit" name="GenrateXML" value="Genrate XML" id="xmlButton" />
<input type = "submit" name="DeleteRecord" value="Delete Record" id="Delete Button"/>
</td>
</tr>
</c:forEach>
</table>
<!-- ********* Below code showing error message from controller if any***********..... -->
<form:errors path="*" />
<c:if test="${not empty message}">
<h4 style="font-style: italic; color: red;">${message}</h4>
</c:if>
<!-- ********* Above code showing error message from controller if any************..... -->
</form:form>
</body>