<%
Set Conn4 = Server.CreateObject("ADODB.Connection")
Conn4.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&server.MapPath("AddDate/carnote.mdb")&";pwd=lym2002"
SQL="select * from productbak order by id "
set rs3=Conn4.execute(SQL)
if Not rs3.EOF then
%>
<script language = "JavaScript">
var onecount6;
onecount6=0;
subcat6 = new Array();
<%
dim onecount6
onecount6 = 0
rs3.movefirst
Do while Not rs3.EOF
response.write "subcat6["&onecount6&"] = new Array("""&rs3("namep")&""","""&rs3("xilie")&""","""&rs3("namep")&""");"
onecount6=onecount6+1
rs3.MoveNext
Loop
response.write "onecount6="&onecount6&""
%>
function changelocation6(locationid6)
{
document.myform.product2.length = 0;
var locationid6=locationid6;
var i;
document.myform.product2.options[0] = new Option('配件名称','');
for (i=0;i < onecount6; i++)
{
if (subcat6[i][1] == locationid6)
{
document.myform.product2.options[document.myform.product2.length] = new Option(subcat6[i][0], subcat6[i][2]);
}
}
}
</script>
<script language = "JavaScript">
var onecount7;
onecount7=0;
subcat7 = new Array();
<%
dim onecount7
onecount7 = 0
rs3.movefirst
Do while Not rs3.EOF
response.write "subcat7["&onecount7&"] = new Array("""&rs3("nump")&""","""&rs3("namep")&""","""&rs3("nump")&""");"
onecount7=onecount7+1
rs3.MoveNext
Loop
response.write "onecount7="&onecount7&""
%>
function changelocation7(village6id)
{
document.myform.village2.length = 0;
var village6id=village6id;
var j;
document.myform.village2.options[0] = new Option('库存数','');
for (j=0;j < onecount7; j++)
{
if (subcat7[j][1] == village6id)
{
document.myform.village2.options[document.myform.village2.length] = new Option(subcat7[j][0], subcat7[j][2]);
}
}
}
</script>
<select name="biglocation2" onChange="changelocation6(document.myform.biglocation2.options[document.myform.biglocation2.selectedIndex].value)" size="1" style="FONT-SIZE: 10pt;background:#eeeeee;width:126px">
<option selected value="1">配件系列</option>
<%
sql = "select distinct xilie from productbak "
set rs3=Conn4.execute(sql)
rs3.movefirst
Do while Not rs3.EOF
response.write "<option value="""&rs3("xilie")&""">"&rs3("xilie")&"</option>"
rs3.MoveNext
Loop
%>
</select>
<%
rs3.close
set rs3=nothing
Conn4.close
set Conn4=nothing
end if
%>
<select name="product2" onChange="changelocation7(document.myform.product2.options[document.myform.product2.selectedIndex].value)" style="FONT-SIZE: 10pt;background:#eeeeee;width:180px">
<option >配件名称</option>
</select>
<select name="village2" size="1" style="FONT-SIZE: 10pt;background:#eeeeee;width:50px" >
<option value="1">库存数</option>
</select>
数量<input type="text" name="s2" size="1"> 单价<input type="text" name="m2" size="7">/元