I have two fields on my db.
One is called CVTypes and the other is called CVNames.
I need to have two dynamic dropdown boxes that allows users to select CV types and CV names from the dropdowns.
How can I do that with this code?
Thanks in advance
Here is code snippet:
<TR>
<TD>CV Type:</TD>
<TD>
<%
dim con
set con = server.createobject("ADODB.Connection")
dim rs
set rs = server.createobject("ADODB.Recordset")
con.open ("DSN=cvs")
rs.open "SELECT * FROM CVs", con
%>
<SELECT name="theSelect">
<OPTION value=none>--Select One--</OPTION>
<%
while not rs.eof
response.write("<OPTION value=" & rs("taskid") & ">")
response.write(rs("CVType") & "</OPTION>")
rs.movenext
wend
set rs = nothing
set con = nothing
%>
</SELECT>
</TD>
</TR>
Originally posted by simflex I have two fields on my db.
One is called CVTypes and the other is called CVNames.
I need to have two dynamic dropdown boxes that allows users to select CV types and CV names from the dropdowns.
How can I do that with this code?
Thanks in advance
Here is code snippet:
<TR>
<TD>CV Type:</TD>
<TD>
<%
dim con
set con = server.createobject("ADODB.Connection")
dim rs
set rs = server.createobject("ADODB.Recordset")
con.open ("DSN=cvs")
rs.open "SELECT * FROM CVs", con
%>
<SELECT name="theSelect">
<OPTION value=none>--Select One--</OPTION>
<%
while not rs.eof
response.write("<OPTION value=" & rs("taskid") & ">")
response.write(rs("CVType") & "</OPTION>")
rs.movenext
wend
set rs = nothing
set con = nothing
%>
</SELECT>
</TD>
</TR>
Use the following code snippet:
<TR>
<TD>CV Type:</TD>
<TD>
<%
dim con
set con = server.createobject("ADODB.Connection")
dim rs
set rs = server.createobject("ADODB.Recordset")
con.open ("DSN=cvs")
rs.open "SELECT * FROM CVs", con
strCVtype=""
strCVname=""
while not rs.eof
strCVtype=strCVtype & "<OPTION value=" & rs("taskid") ">"
& rs("CVType") & "</OPTION>"
strCVname=strCVname & "<OPTION value=" & rs("taskid") ">"
& rs("CVName") & "</OPTION>"
rs.movenext
wend
set rs = nothing
set con = nothing
%>
<SELECT name="TypeSelect">
<OPTION value=none>--Select One--</OPTION>
<%=strCVtype%>
</SELECT>
<SELECT name="NameSelect">
<OPTION value=none>--Select One--</OPTION>
<%=strCVname%>
</SELECT>
</TD>
</TR>
--
<b>Vishal </b>
Originally posted by tasneem I have a similar request, with the change that people should select from one drop down box and the results should be in a table form.
thnks
What you can do is, Write a Javascript function which submits the form back to the same URl and call this function on "OnClick" even of the Dropdown. Now when that function will get a call then you will get the value of the selected option in dropdown and based on that value you can show the details in a Table Form.
Bookmarks