786snow
Programmer
- Nov 12, 2006
- 75
what is wrong with the code here, no matter what radio button I pick, even if I don't pick any I get the value "by_date"
Code:
<script>
function submitRequest() {
var test=document.getElementById('dateType').value;
alert(test); }
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 3</title>
</head>
<body>
<FORM ACTION="/NASApp/EDocsCtx/EDocsServlet?actionType=2" METHOD="POST" NAME= "Statements" onsubmit="return submitRequest()">
<table width="70%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="20"></td>
<td align="right" nowrap><input type="radio" name="dateType" id="dateType" value="by_date" ><b>Date:</b></input></td>
<td align="right" nowrap><input type="radio" name="dateType" id="dateType" value="date_range"><b>Date Range:</b></input></td>
<td align="left"> <input name="edocsStatements" type="image" ALT="Search" SRC="/images/b_Search.gif" BORDER="0" HEIGHT="21" WIDTH="68" /></td>
</tr>
</table>
</body>
</html>