Ok, ich schneide einfach die SQLs und das meiste ASP etc weg um platz zu sparen_: funktionsaufruf bei onchange von beschaffungsinstrument
vielen dank für deine hilfe :)
----------------------------------------
<%
'****************************************************************************************
Set rsBI1 = Server.CreateObject("ADODB.RecordSet")
SQL = "Select * From Quelle;"
rsBI1.open SQL, Conn,adOpenStatic, AdLockReadOnly
'****************************************************************************************%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<style>
BODY { font-family: Arial; font-size: 9pt}
TABLE { font-family: Arial; font-size: 9pt}
A:hover {color:"#EB0066"; font-size: bolder}
</style>
<base target="_self">
<title>Bewerber Detail</title>
<link rel="stylesheet" type="text/css" href="../CSS/BV.css">
</head>
<body bgcolor="#6699FF" link="#808080" vlink="#808080" alink="#EB0066">
<!--#include file="adovbs.inc"-->
<%response.Write(output & "<br>" & "<br>")%>
<b><font size="3">Bewerber Detail</font></b>
<form method="POST" action="B_Detail.asp?Action=Save&bid=<%=BID%>" ID=Form1>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#FFFFFF" id="AutoNumber1" width="594" bgcolor="#99CCFF">
<tr>
<td width="25%">Beschaffungsinstrument*</td>
<td width="25%"><select size="1" name="Beschaffungsinstrument" class="popup1" ID=Select3 onChange="javascript:anz(this.value)">
<%while not rs3.eof
if BBeschaffungsinstrument = rs3("IID") then
sel="SELECTED"
else
sel=""
end if%>
<option <%=sel%> value="<%=rs3("IID")%>"><%=rs3("InstrumentBezeichnung")%></Option>
<%rs3.movenext
wend
rs3.Close
%>
</select>
</td>
<td width="25%">Ausprägung*</td>
<td>
<select size="1" name="Auspragung" class="popup1" ID=Select4>
<option value="" selected></option>
<script type="text/javascript">
function anz(BI)
{
<%rsBI1.MoveFirst%>
//Variablen-Definition
//**************************************************
var max = <%=rsBI1.RecordCount%>;
var z = 0;
var tat = 0;
//Definition Gesamt-Array
var BI1 = new Array(max);
for(var i = 0; i < BI1.length; ++i)
{
BI1[i] = new Array(3);
}
//**************************************************
//Abfüllen Gesamt-Array
//**************************************************
while(z < max)
{
<%
while not rsBI1.EOF
%>
BI1[z][0] = "<%=rsBI1("MID")%>";
BI1[z][1] = "<%=rsBI1("Beschaffungsinstrument")%>";
BI1[z][2] = "<%=rsBI1("Bezeichnung")%>";
if(<%=rsBI1("Beschaffungsinstrument")%> == BI)
{
tat++;
}
z++;
<%
rsBI1.MoveNext
wend
%>
}
//**************************************************
//Anzeige
z = 0;
document.writeln("<selcet>");
while(z < max)
{
if(BI1[z][1] == BI)
{
document.writeln("<option value='" + BI1[z][0] + "'>" + BI1[z][2] + "</option>");
}
z++;
}
document.writeln("</selcet>");
}
</script>
</select>
</td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td> </td>
<td><input type="submit" value="Speichern" name="Action" class="button1" ID=Submit1/></td>
</tr>
</table>
</form>
</body>
</html>