Hi, im doing a final year computing project at uni i need to be be able to check that some text boxes are not empty the problem is the text boxes are called the same names..can anyone help.... my html code is below
<html>
<head>
<link rel="stylesheet" type="text/css" href="standard.css">
<script language="javascript" src="scripts.js">
</script>
</head>
<body>
<table cellpadding="3" cellspacing="0" border="0" height="600" width="800" id="theme">
<tr>
<td colspan="6" height="50" id="studentheading" width="800">
Coursework enter page for <%=module%>
</td>
</tr>
<tr height="30" width="800">
<td></td>
<td>Student Name</td>
<td>Student Surname</td>
<td>ModuleID</td>
<td>CW No.</td>
<td>CW Mark(%)</td>
</tr>
<form action="cwentered.asp" method="post" name="enteredcw">
<%do until objRs.EOF%>
<tr height="10">
<td><input type="hidden" name="studentid" value="<%=objRs(2)%>"></td>
<td><input readonly type="text" name="studentforname" value="<%=objRs(3)%>"></td>
<td ><input readonly type="text" name="studensurname" value="<%=objRs(4)%>"></td>
<td ><input type="text" name="moduleid" value="<%=module%>"></td>
<td><input type="text" name="cwnumber" maxlength="1" onKeypress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"></td>
<td><input type="text" name="cwmark" maxlength="3" onKeypress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"></td>
<%
objRs.MoveNext%>
</tr>
<%loop
objRS.close
conn.close
%>
<tr>
<td colspan="6" align="right" valign="top"><input type="submit" value="Submit"></td>
</tr>
</form>
</table>
</body>
</html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="standard.css">
<script language="javascript" src="scripts.js">
</script>
</head>
<body>
<table cellpadding="3" cellspacing="0" border="0" height="600" width="800" id="theme">
<tr>
<td colspan="6" height="50" id="studentheading" width="800">
Coursework enter page for <%=module%>
</td>
</tr>
<tr height="30" width="800">
<td></td>
<td>Student Name</td>
<td>Student Surname</td>
<td>ModuleID</td>
<td>CW No.</td>
<td>CW Mark(%)</td>
</tr>
<form action="cwentered.asp" method="post" name="enteredcw">
<%do until objRs.EOF%>
<tr height="10">
<td><input type="hidden" name="studentid" value="<%=objRs(2)%>"></td>
<td><input readonly type="text" name="studentforname" value="<%=objRs(3)%>"></td>
<td ><input readonly type="text" name="studensurname" value="<%=objRs(4)%>"></td>
<td ><input type="text" name="moduleid" value="<%=module%>"></td>
<td><input type="text" name="cwnumber" maxlength="1" onKeypress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"></td>
<td><input type="text" name="cwmark" maxlength="3" onKeypress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"></td>
<%
objRs.MoveNext%>
</tr>
<%loop
objRS.close
conn.close
%>
<tr>
<td colspan="6" align="right" valign="top"><input type="submit" value="Submit"></td>
</tr>
</form>
</table>
</body>
</html>