<%@ page import= "java.util.date,yava.fileapp.*,java.sql.*;"
Contenttype= "text/html;charset=gb2312" pageencoding= "GB2312"
%>
<style>
. f9{font-size:9pt;}
. bgc{background-color: #AECAF9; color: #0033FF}
Buttons{font-family:arial font-size:13px; Font-weight:bold background-color: #6796E4; color:white; Border-top: Solid 2px #AACAFB;
Border-bottom:solid 1px #4E7DC1;
Border-left:solid 1px #AECAF9;
Border-right:solid 1px #5679BD;
padding:1px;
margin:0px;}
</style>
<script language= "JavaScript" >
<!--
Function RV ()
{
var val= "";
for (i=0;i<combo_box.list2.length;i++) {
val+= "," +combo_box.list2[i].value;
}
if (Val.charat (0) = = ",") {
Val=val.substr (1,val.length);
}
Opener.form1.frecname.value=val;
Self.close ();
}
-->
</SCRIPT>
<body leftmargin= "0" topmargin= "0" marginwidth= "0" marginheight= "0" >
<JSP (Preferred for Sun enterprise applications): Usebean id= "User" scope= "session" class= "Yava.fileapp.UserBean"/>
<%
CDataSource ds=new CDataSource (); Data Connection Bean Instance
Java.sql.Connection conn=ds.getconnection ();
Java.sql.Statement Stmt=null;
Java.sql.ResultSet Rs=null;
Cdatacheck dc=new Cdatacheck ();
%>
<%
String sqlu= "Select T1.fno, T1.fname, t2.fname as fdept from Tuser T1 left OUTER JOIN tdept t2 in t1.fdept = t2.fno order by T2.fname ";
Stmt=conn.createstatement ();
Rs=stmt.executequery (SQLU);
%>
<script language=javascript>
arr = new Array ();
<% int temp=0;
while (Rs.next ())
{
%>
Arr[<%=temp%>]=new Array ("<%=rs.getstring" ("fname")%> "," <%=rs.getstring ("fdept")%> ");
<%
temp = temp + 1;
}
%>
temp=<%=temp%>;
function changelocation (ID) {
document.combo_box.city.length=0; Initializes the length of level 2nd menus, starting with the subscript 0
var i = 0;
Document.combo_box.city.options[0]=new Option (-------,);
for (i=0;i<temp;i++) {
if (arr[i][1]==id) {//if equal, it is shown that there is a subset of input level 1th organization in level 2nd, total number of arr[[department]
Document.combo_box.city.options[document.combo_box.city.length] = new Option (arr[i][0], arr[i][0]);
}
}
}
</script>
<form name= "Combo_box" >
<table border= "0" cellspacing= "0" cellpadding= "0" height= "210" width= ">"
<tr height= ">"
<TD bgcolor= "#336699" class= "buttons" Align=center><font color= #ffffff > Department Selection </font></td>
<TD bgcolor= "#336699" class= "buttons" Align=center><font color= #ffffff > Name Selection </font></td>