mystichabor
January 24th, 2003, 04:41 PM
I have 2 select boxes; the second select box is dynamically populated, from the database, when the first select box is selected. I don't know how to do get the data from the access using the client script. Is there other way? Thanks.
1) <select name="oOption1" onchange="populatesecondbox()">
<%while not rs.EOF %>
<option value="<%=rs("project_id")%><%=rs("name")%></option>
<%rs.move next
wend%>
</select>
2) <select name="oOption2">
</select>
<script language="vbscript">
set oOptionSub = document.createElement("OPTION")
document.formname.oOption2.options.add(oOption)
oOptionSub.text = "fromdatabase"
oOptionSub.value = "fromdatabase"
</script>
1) <select name="oOption1" onchange="populatesecondbox()">
<%while not rs.EOF %>
<option value="<%=rs("project_id")%><%=rs("name")%></option>
<%rs.move next
wend%>
</select>
2) <select name="oOption2">
</select>
<script language="vbscript">
set oOptionSub = document.createElement("OPTION")
document.formname.oOption2.options.add(oOption)
oOptionSub.text = "fromdatabase"
oOptionSub.value = "fromdatabase"
</script>