请问一个有关传递参数的问题?
outsingle.asp
<%@Language=VBScript%>
<!--#include file ="../inc/conn.asp"-->
<!--#include file ="../inc/adovbs.inc"-->
<%' If Trim(request("flag"))<>"1" Then %>
<html>
<head>
<title>填写外出单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../inc/main.CSS" type="text/css">
<script language="javascript">
function checkunitname()
{
if (event.keyCode==13)
{
event.keyCode="#0";
var Citycode="0001";
var ProvinceCode="01";
var UnitSSN1=document.form1.unitname.value;
window.open('returnunitname1.asp?spellcoding='+UnitSSN1+"&Citycode="+Citycode+"&ProvinceCode="+ProvinceCode,'register','left=180,top=255,width=250,height=380,status=no,toolbars=no,menubars=no,scrollbars=auto,resize=no');
}
return true;
}
function kb()
{
if(event.keyCode==13)
event.keyCode=9;
}
</script>
<script>
//自动最大化
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<form name="form1" method="post" action="AddOutSingle_result.asp" onkeydown="kb()">
<table width="600" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FF9900">
<tr bgcolor="#FFFFFF">
<td height="19" colspan="4">
<div align="center"><font color="#FF0000"><b>填写外出单</b></font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="108">外出人员</td>
<td width="201">
<input type="text" name="CompanyPerson" value=<%=Session("Username") %>>
</td>
<td width="59">外出时间</td>
<td width="203">
<%
OutSingleTime=date&" "&time
%>
<input type="text" name="OutSingleTime" value="<%=OutSingleTime %>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="108" height="19">单位名称</td>
<td colspan="3" height="19">
<input type="text" name="unitname" onkeydown="checkunitname()">
(输入单位简拼,点击回车,即可出现所需要的单位名称) </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="108">单位联系人</td>
<td width="201">
<input type="text" name="ClientDutyPerson">
</td>
<td width="59">外出地点</td>
<td width="203">
<input type="text" name="Address" value="">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="108">外出原因</td>
<td colspan="3">
<input type="text" name="OutSingleReason" maxlength="255" size="60">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="4">
<div align="center">
<input type="button" name="Add" value="增加" onclick="javascript:form1.submit()">
<input type="reset" name="Submit2" value="重写">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
Conn.Close
Set Conn=Nothing
%>
returnunitname1.asp
<%@Language=VBScript%>
<!--#include file ="../inc/conn.asp"-->
<% If (trim(request("ProvinceCode"))="" and trim(request("Citycode"))="") Then %>
<script language="javascript">
alert("请选择省市");
self.close();
</script>
<% Else %>
<%
Sql="select * from unitbaseinfo where spellcoding like '"&trim(request("spellcoding"))&"%' and (ProvinceCode='"&trim(request("ProvinceCode"))&"' and Citycode='"&trim(request("Citycode"))&"')"
set rs=server.createobject("adodb.Recordset")
rs.open sql,conn,1,3
%>
<html>
<head>
<title>查询单位名称</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function check(t,s,m){
opener.document.form1.Address.value=m;
opener.document.form1.ClientDutyPerson.value=s;
opener.document.form1.unitname.value=t;
self.close();
}
</script>
<link rel="stylesheet" href="../inc/main.CSS" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<table width="218" border="0" cellspacing="1" cellpadding="3" bgcolor="#FF6600">
<tr bgcolor="#FFFFFF">
<td width="17"> </td>
<td width="126">单位名称</td>
<td width="53">单位简拼</td>
</tr>
<% If Not Rs.Eof Then
Sql2="select * from personnalbaseinfo where unitssn='"&Rs("unitssn")&"' and (ProvinceCode='"&trim(request("ProvinceCode"))&"' and Citycode='"&trim(request("Citycode"))&"')"
response.write sql2
set rs2=server.createobject("adodb.Recordset")
rs2.open sql2,conn,1,3
%>
<% While Not Rs.Eof
%>
<tr bgcolor="#FFFFFF">
<td width="17">
<input type="radio" name="unitname" value="<%=Rs("unitname")%>" onclick="check('<%=Rs("unitname") %>','<%=Rs2("personnalname")%>','<%=Rs("Address") %>')">
</td>
<td width="126"><%=Rs("unitname")%></td>
<td width="53"><%=Rs("spellcoding")%></td>
</tr>
<% Rs.Movenext
Wend
Rs.Close
Set Rs=Nothing
%>
<% Else %>
<tr bgcolor="#FFFFFF">
<td colspan=3>没有此单位</td>
</tr>
<% End If %>
</table>
</form>
</body>
</html>
<% End If %>
我现在实现的功能是:在单位名称一栏中输入单位的简拼,点击回车之后,在弹出的窗口
returnunitname1.asp中出现与之相关的几个单位名称,点击前面的单选按钮后,单位名称(汉字)和相应联系人和单位地址自动的出现在相应的输入框中
我现在遇到的问题是,一个单位有可能出现多个的联系人,我如何将多个的联系人都显示到单位联系人一栏中。
说明:unitbaseinfo是单位基本信息表、personnalbaseinfo是联系人基本信息表