<!-เปิดสองตาราง->
-
setRs1 = server.createObject ("adodb.recordset"))
sql1 = "เลือก*fromtype1"
Rs1.opensql1, Conn, 1,3
setRs2 = server.createObject ("adodb.recordset"))
sql2 = "เลือก*fromtype2"
rs2.opensql2, Conn, 1,3
-
<formName = "form1">
<!-สร้างเมนู->
<selectName = "type" size = "1" onChange = "เปลี่ยนเส้นทาง (this.options.value)">
<aptovientValue = 0> โปรดเลือก ... </potion>
<%whilenotrs1.eof%>
<optiveValue = "<%= rs1 (" news_type_1_id ")%>"> <%= rs1 ("news_type_1_type")%> </petion>
<%rs1.movenext
Wend%>
</เลือก>
<!-สร้างเมนู 2->
<selectName = "type2" size = "1">
<aptovientValue = 0> โปรดเลือก </petion>
</เลือก>
</div>
</form>
<!-ต่อไปนี้เป็นคำสั่งสคริปต์สำหรับการใช้งานเฉพาะ->
<script>
-
vartemp = document.form1.type2
FunctionReverect (x) {
ความแตกต่าง
i = 0
สำหรับ (varm = temp.options.length-1; m> 0; m--)
temp.options [m] = null
<%whilenotrs2.eof
-
cnt = <%= rs2 ("news_type_1_id")%>
ถ้า (cnt == x) {
temp.options = newOption ("<%= rs2 (" news_type_2_type ")%>", "," <%= rs2 ("news_type_2_id")%> ")
i = i+1}
-
Rs2.Movenext
Wend%>
-
-
</script>