Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javascript+jsp+onchange event

843842Nov 28 2008 — edited Nov 28 2008
please 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2008
Added on Nov 28 2008
2 comments
1,607 views