Afhængig dropdown
Hvordan laver jeg dette om til javascript.<form name="sels" method="post">
<%
'Hendt den valgte pageid
pageid = Request.Form("pageid")
Set Conn = Server.CreateObject("ADODB.Connection")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("cgi-bin/database.mdb")
Conn.Open connStr
%>
<select name="pageid" onchange="this.form.submit();">
<%
SQL = "SELECT * FROM varegrupper"
Set rs = Conn.Execute(SQL)
do while not rs.EOF
Response.Write "<option value=""" & rs("ID") & """"
if CStr(pageid) = CStr(rs("ID")) then Response.Write " selected "
Response.Write ">" & rs("gruppenavn") & "</option>"
rs.Movenext
loop
%>
</select><select name="undermemnuer">
<%
'Find alle under menuer til den valgt menu
if pageid <> "" then
SQL = "SELECT * FROM varekartotek WHERE varegruppeid = " & pageid & " ORDER BY vare"
Set rs = Conn.Execute(SQL)
do while not rs.EOF
Response.Write "<option value=""" & rs("ID") & """>" & rs("vare") & " (" & rs("varenext") & ")</option>"
rs.Movenext
loop
%>
</select><input type="text" name="Test">
<input type="text" name="Test" size="3" value="gr.">
<input type="button" name="Test" value="Tilføj">
<%
end if
%></form>