javascript+jsp+onchange event
843842Nov 28 2008 — edited Nov 28 2008please check this program i have combobox in jsp page whenever i open jsp page i want to see that name select sanction number by default should appear in combobox
kindly do this help
<script language="text/javascript">
function a()
{
document.frm.action="admin";------------------------This is admin.java (in servlet i am retrieving all sn number and display in combobox document.frm.submit();
}
</script>
<from name="frm" action="" metod="post">
<select name="deptlist" id="sn" onchange="javascript: a();" /> ----it is calling the function a()
<select>Select Sanction Number</select> ------this name is not appearing in combobox
<%
while(iterator.hasNext())
{String sn=(String)iterator.next();
%>
<option value="<%=sn%>"><%=sn%></option> ----output value in this option
<%}%>
</select>
Regards
Akshatha