Ask a Question related to ASP Database, Design and Development.
-
alexz #1
2 dynamic drop down boxes from database
I'm populting one box from a table called category.
I want to create another box that would be populated subcatagories
from the subcategory table based on the selection from category.
This the code for the first drop down
<form method="Post" action="add.asp" onsubmit="return
status_checker()" name="search">
<SELECT NAME="Category_ID" ONCHANGE=search.submit()>
<%
Dim MyConn, RS, SQLcmd
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "media"
Set RS=Server.CreateObject("ADODB.RecordSet")
SQLcmd = "SELECT * From Categories"
RS.Open SQLcmd, MyConn,1
do until rs.eof
response.write "<option value=""" & rs("ID") & """>"
response.write rs("Category")
response.write "</option>"
rs.movenext
loop
rs.close
%>
</select>
This query should go into the second dropdown box.
SQLcmd = "SELECT Subcategories.CategoryID, Subcategories.SubCategory
FROM Subcategories WHERE (((Subcategories.CategoryID)=" &
request("Category_ID") & "))"
I also should be able to submit the selections to the add.asp page
Thanks
alexz Guest
-
Typing for Drop Down Boxes
Basically you know when you have a drop down box and you type a letter the drop box automatically goes to an item beginning with that letter. But... -
dynamic drop downlists in an editable dynamic datagrid.
How would we address a situation where we have to put dynamic drop downlists in an editable dynamic datagrid. So the scenario is to populate a... -
Drop down boxes in CFGrid using cfgridcolumn
Hi, Has anyone had problems with drop down boxes displaying in cfgrid using cfgridcolumn as follows: <cfgridcolumn name="Location"... -
Populating Drop Down Boxes from a database
We moved our wesite from a Box running Coldfusion 4.0 to a box running Coldfusion MX. We populate some drop down boxes with information from a... -
unwanted space from drop-down boxes and forms
i've got two drop down boxes in seperate forms in one table but seperate table rows. when i view them in DWMX everything is fine. i have no "<br>"or... -
Bullschmidt #2
Re: 2 dynamic drop down boxes from database
Here is one idea (refreshing the page) about that:
ASP Design Tips - Dependent Listboxes
[url]http://www.bullschmidt.com/devtip-dependentlistboxes.asp[/url]
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
[url]http://www.Bullschmidt.com[/url]
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest



Reply With Quote

