如何使用classicasp填充3个下拉列表数据? [英] how to fillter 3 dropdown list data using classicasp?
本文介绍了如何使用classicasp填充3个下拉列表数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Please any one help below requirements. It would be very useful for me . Advance Thanks
I have a datas in sql database table. I want to display the values in dropdown list,
for example I have three dropdown list in form , If I click values in first dropdown list. automaticaly respective values to show the second in drop down list .
然后单击第二个下拉列表自动分别显示下拉列表中的thord ..
我的代码在下面
then click second dropdown list automaticaly respective values to show the thord in drop down list..
My code is below
<body>
ON ERROR RESUME NEXT
dim rs,sql,rs1,sql1
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open "select distinct dvn_cd,dd from sidhsc3 order by DD asc", con,2,3
%>
<form method="POST" action="lsasupdate.asp" name="form1" id="form1" onSubmit="return autosubmit()">
</font>
<table>
<tr>
<td width="22%" ><b>Name of the HUD</b></td>
<td width="28%" >
<select size="1" name="hud" id="hud">
<option value="">--Select District--</option>
<%
do while not rs.eof
%>
<option value="<% =rs("dd") %>">
<% =rs("dd") %>
</option>
<%
rs.movenext
loop
rs.close
%>
</select>
</td>
</tr>
<tr>
<td <b>Block Name</b></td>
<td width="16%" >
<font face="Arial, Arial, Helvetica">
<select size=1 name="block1" id="block1" class="select" value="--Select Block--">
<option value="">---Select Block---</option>
<% response.Write("<br>")
set rs=Server.CreateObject("ADODB.Recordset")
sql="select distinct bl_cd,bk from sidhsc3 order by bk asc"
rs.open sql, con,2,3
do while not rs.eof
%>
<option value=<% =rs("bk")%>><%=rs("bk")%></option><br />
<%
rs.movenext
loop
rs.close
%>
</select>
</td>
</tr>
<tr>
<td> <b>PHC Name</b></td>
<td width="84%" >
<select size=1 name="phc1" id="phc1" >
<option value="">---Select PHC---</option>
<%
set rs=Server.CreateObject("ADODB.Recordset")
sql="select distinct phc_cd,phc from sidhsc3 order by phc asc"
rs.open sql, con,2,3
do while not rs.eof
%>
<option value=<% =rs("phc") %>><% =rs("phc")%></option><br />
<%
rs.movenext
loop
rs.close
%>
</select> </td>
</tr>
</table>
<font face="Arial, Arial, Helvetica">
<p align="center">
<input type="button" value="Back" name="back" onClick="history.go(-1)" style="font-family: Times New Roman; font-weight: bold; border-style: groove">
<input type="Submit" value="Submit" name="Submit" tabindex="12" style="font-family: Times New Roman; font-weight: bold; border-style: groove">
</form>
</font>
</body>
在上面的代码中我成功地将数据库表中的值提供给各自的下拉列表,但我不知道填写下拉列表代码...
请有人帮帮我...
我只想要经典的asp不要asp.net .....
In the above code successfully i got the values from the database table to respective dropdowns but i dont know to fillter the dropdown list code...
Please anyone help me...
I want only classic asp dont want asp.net.....
推荐答案
查看解决方案..它会帮助你..
如何根据其他值将值加载到下拉列表中经典ASP中的下拉值是什么? [ ^ ]
See the solutions..it'll help you..
How to load values into dropdown depending on other dropdown value in Classic ASP?[^]
这篇关于如何使用classicasp填充3个下拉列表数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文