#32002/9/28 9:05:45
谢谢,是一个三级联动表单,我在表1中(access数据库)分别建了三个字段:system,database,databaseqian,对应aalist,sslist和ddlist。
在正常的下拉菜单中,如
我可以将菜单的值
rst("01")=request("01")输到数据库中,但在这个三级联动中,值在哪里,如何传输?谢谢!
------------------------三级联动菜单如下----------------------------
//连接数据库代码如下
<%
set Re = Server.CreateObject("ADODB.Recordset")
Re.ActiveConnection = MM_con12_STRING
Re.Source = "SELECT * FROM ok"
Re.CursorType = 0
Re.CursorLocation = 2
Re.LockType = 3
Re.Open()
Re_numRows = 0
%>
<%
CALL listmaker(aalist,"aa", sslist ,"ss", ddlist, "dd", pubevent, pubfun, "myForm")
%>
//三级联动菜单如下:
<%= aalist%>
<%= sslist%>
<%= ddlist%>
//实现联动代码如下:
<%
SUB listmaker(byref list1, system, byref list2, database, byref list3, databaseqian, byref myevent, byref myfun, myForm)
aalist=""
myevent=vbcrlf & "key=new Array(" & howmanygroups+1 & ");"
myevent=myevent & vbcrlf & "key1=new Array(" & howmanygroups+1
myevent=myevent & ");" & vbcrlf & tempSTR
tempSTR =vbcrlf & "function Buildkey" & "(num)" & vbcrlf
tempSTR =tempSTR & "{" & vbcrlf
tempSTR =tempSTR & "Buildkey1(0);" & vbcrlf
tempSTR =tempSTR & "document." & myForm & "."
tempSTR =tempSTR & database & ".selectedIndex=0;" & vbcrlf
tempSTR =tempSTR & "for(ctr=0;ctrtempSTR =tempSTR & "{" & vbcrlf
tempSTR =tempSTR & "document." & myform & "." & database
tempSTR =tempSTR & ".options[ctr]=new Option(key[num][ctr],"
tempSTR =tempSTR & "key[num][ctr]);" & vbcrlf
tempSTR =tempSTR & "}" & vbcrlf
tempSTR =tempSTR & "document." & myForm & "." & database
tempSTR =tempSTR & ".length=key[num].length;" & vbcrlf
tempSTR =tempSTR & "}" & vbcrlf
tempSTR =tempSTR & vbcrlf & "function Buildkey1" & "(num)" & vbcrlf
tempSTR =tempSTR & "{" & vbcrlf
tempSTR =tempSTR & "document." & myForm & "."
tempSTR =tempSTR & databaseqian & ".selectedIndex=0;" & vbcrlf
tempSTR =tempSTR & "for(ctr=0;ctrtempSTR =tempSTR & "{" & vbcrlf
tempSTR =tempSTR & "document." & myform & "." & databaseqian
tempSTR =tempSTR & ".options[ctr]=new Option(key1[document.myForm.aa.selectedIndex][num][ctr],"
tempSTR =tempSTR & "key1[document.myForm.aa.selectedIndex][num][ctr]);" & vbcrlf
tempSTR =tempSTR & "}" & vbcrlf
tempSTR =tempSTR & "document." & myForm & "." & databaseqian
tempSTR =tempSTR & ".length=key1[document.myForm.aa.selectedIndex][num].length;" & vbcrlf
tempSTR =tempSTR & "}" & vbcrlf
myfun=tempSTR
END sub
%>
<%
Re.Close()
%>