Hello Sir / Madam,
How to acess the value of array in javascript function. consider the following example
<script language = javascript>
function check_max()
{
var i = 0;
for (i = 0; i< parseInt(document.form[0].hid_cnt.value); i++)
{
alert(document.forms[0].cmb_max[i].value);
}
}
</script>
<body>
<%
// consider rs to be a recordset
int cnt = 0;
while (rs.next())
{
%>
<select name = cmb_max[<%=cnt%>]>
<option value = 2>
2
</option>
</select>
<%
}
%>
<input type = button value = "Calculate" onclick=check_max()>
</body>
on clicking of calculate the value 2 should be poped up which is not done. so kindly rectify my problem as soon as possible.
kindly mail me on
theguardian@vsnl.net