<!-Buka dua tabel->
<%
setrs1 = server.createObject ("adodb.recordset")
sql1 = "pilih*fromtype1"
rs1.opensql1, conn, 1,3
setrs2 = server.createObject ("adodb.recordset")
sql2 = "pilih*fromtype2"
RS2.OpensQL2, Conn, 1,3
%>
<formname = "form1">
<!-Buat menu->
<selectName = "type" size = "1" onchange = "redirect (this.options.value)">
<OptionValue = 0> Pilih ... </potion>
<%whilenotrs1.eof%>
<optionValue = "<%= rs1 (" news_type_1_id ")%>"> <%= rs1 ("news_type_1_type")%> </tiption>
<%rs1.movenext
wend%>
</pilih>
<!-Buat menu 2->
<SelectName = "type2" size = "1">
<OptionValue = 0> Pilih </potion>
</pilih>
</div>
</form>
<!-Berikut ini adalah pernyataan skrip untuk implementasi spesifik->
<script>
<!-
vartemp = document.form1.type2
functionRedirect (x) {
Vari
i = 0
untuk (varm = temp.options.length-1; m> 0; m--)
Temp.Options [m] = null
<%whilenotrs2.eof
%>
cnt = <%= rs2 ("news_type_1_id")%>
if (cnt == x) {
temp.options = newoption ("<%= rs2 (" news_type_2_type ")%>", "<%= rs2 (" news_type_2_id ")%>")
i = i+1}
<%
RS2.Movenext
wend%>
}
//->
</script>