Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jamie61880 #1
Drill Down dynamic drop down menus
Can anyone please help me? I want to be able to drill down to some specific
information using drop down menus. I want the user to be able to choose an item
from the first drop down, and depending on what they choose in that drop down
will populate the items in the next drop down that shows up. I want maybe 3 or
4 of these drop downs show up before the user can click submit to get the
information they need. I have all my information with the different items in
one table in my access database. I would not like to create more than one table
if I don't have to. Is there a way for this all to work? Can someone please
help me? I would really appreciate it a lot. Thank you.
Andy
jamie61880 Guest
-
Drop down menus using CSS
Can anyone more experienced with Dreamweaver help me get my drop down menu to work in IE? By looking at the website I have been trying to fix,... -
drop down menus
CC: It loads slowly because it is large relative to the target weight for a web page. The only remedy is to not use that method. Here are two... -
Drop-Down Menus?
this might be a silly question, but what is the best way to use DW drop-down menus througout your site for navigation? Is there a way to put the... -
Dynamic Drill down menus
Hello, I have created a db that holds specific information ie a business name. I am running into a problem on a form when you choose the business... -
Drop Menus?
Do I need a special software or different program to create in a normal flash page production, a drop menu that (a) drops when scrolled over, (b)... -
jamie61880 #2
Drill Down dynamic drop down menus
Can anyone please help me? I want to be able to drill down to some specific
information using drop down menus. I want the user to be able to choose an item
from the first drop down, and depending on what they choose in that drop down
will populate the items in the next drop down that shows up. I want maybe 3 or
4 of these drop downs show up before the user can click submit to get the
information they need. I have all my information with the different items in
one table in my access database. I would not like to create more than one table
if I don't have to. Is there a way for this all to work? I have included some
code below that displays the 2nd drop down after something is chosen out of the
first one, but it doesn't narrow down my choices to only the ones I need to
see. I have kept the comments in here also of where I got the code from
originally so you can see what they say to do. Can someone please help me? I
would really appreciate it a lot. Thank you.
Andy
<!--- store the selected Main_Group variable variable after the first select
boxes submits itself --->
<cfif isDefined('form.select_PinCount')>
<cfset page.select_PinCount = form.select_PinCount>
</cfif>
<cfoutput>
<form method="post" action="email_code_test4.cfm">
<!--- <form method="post" action="roles_select.cfm"> --->
<!--- query DB for the first drop down list --->
<cfquery name="get_PinCount" datasource="#application.datasource#">
SELECT Distinct Package_ID, Pin_Count, Pitch, Body_Size_mm
FROM BGA
WHERE Pin_Count = Pin_Count
ORDER BY Pin_Count
</cfquery>
<!---SELECT distinct users.title
FROM users, ind_record
WHERE ind_record.manager = '#trim(session.skillmatrixlastname)#,
#trim(session.skillmatrixfirstname)#'--->
<!--- first drop down list --->
<!--- NOTICE the onChange javascript event in the select tag, this is what
submits the form after the first selection --->
<select name="select_PinCount" required="yes" onchange="this.form.submit()">
<option>Select Pin Count</option>
<!--- dynamically populate the first drop down list based on the get_Roles
query ---> <!--- NOTICE the CFIF within the option tag, this says, if the
first selection has been made, display the chosen option when the page reloads
--->
<cfloop query="get_PinCount">
<option value="#Pin_Count#" <cfif isDefined('form.select_PinCount')><cfif
form.select_PinCount eq
"#Pin_Count#">selected</cfif></cfif>>#Pin_Count#</option>
</cfloop>
</select>
<p><!--- if the first selection has been made, display the second drop down
list with the appropriate results --->
<cfif isDefined('page.select_PinCount')>
<!--- query DB for second drop down list, based on the selected item from the
first list --->
<cfquery name="get_BodySize" datasource="#application.datasource#">
SELECT Distinct Package_ID, Pin_Count, Pitch, Body_Size_mm
FROM BGA
WHERE Pin_Count = Pin_Count
ORDER BY Body_Size_mm
</cfquery>
<!----SELECT users.employee_id, users.title, users.last_name, users.first_name
FROM users, ind_record
WHERE ind_record.manager = '#trim(session.skillmatrixlastname)#,
#trim(session.skillmatrixfirstname)#' AND users.employee_id =
ind_record.employee_id--->
<BR>
<!--- second drop down list
<select MULTIPLE size="25" name="select_Employee_Roles" required="yes">
<option>Select Body Size</option>
--->
<select name="select_BodySize" required="yes" onchange="this.form.submit()">
<option>Select Body Size</option>
<!--- dynamically populate the second drop down list based on the
get_Employees query
<cfloop query="get_Employees">
<option value="#Body_Size_mm#"
<cfif isDefined('form.select_Roles')>
<cfif form.select_Roles eq
"#Body_Size_mm#">selected</cfif></cfif>>#Body_Size_mm#
</option></cfloop>
--->
<cfloop query="get_BodySize">
<option value="#Body_Size_mm#" <cfif isDefined('form.select_PinCount')><cfif
form.select_PinCount eq
"#Body_Size_mm#">selected</cfif></cfif>>#Body_Size_mm#</option>
</cfloop>
</select>
</cfif>
</form>
</cfoutput>
jamie61880 Guest
-
cgsj_usa@yahoo.com #3
Re: Drill Down dynamic drop down menus
Search the Internet and Macromedia's site for Two_SelectsRelated and Three_SelectsRelated custom tags. I believe that these provide the functionality that you require. Thanks.
Chris
cgsj_usa@yahoo.com Guest
-
cgsj_usa@yahoo.com #4
Re: Drill Down dynamic drop down menus
Search the Internet and Macromedia's site for Two_SelectsRelated and Three_SelectsRelated custom tags. I believe that these provide the functionality that you require. Thanks.
Chris
cgsj_usa@yahoo.com Guest
-
jamie61880 #5
Re: Drill Down dynamic drop down menus
Chris,
I got the Three_SelectsRelated code to work, except I don't want to
have my data split up into 3 tables. I would like them to all be in the same
table. Is it possible for this code to work this way? I can also only have 3
drop down menus. I need 4. How do I get 4? Thanks for your help.
Andy
jamie61880 Guest
-
cgsj_usa@yahoo.com #6
Re: Drill Down dynamic drop down menus
That seems like bad design in your database, but that's a different topic. The
tags are all driven off of a query, so just compose the query that contains the
information that you want. You are right though...you may have to re-construct
your database for the tag to work correctly. As for a "Four_SelectsRelated", I
think that I saw one on the Internet...just search for that term. Thanks.
Chris
P.S. If push comes to shove, you may end up having to modify the source code
for Three_SelectsRelated to do what you want it to do.
cgsj_usa@yahoo.com Guest
-
jamie61880 #7
Re: Drill Down dynamic drop down menus
Chris,
I need to keep all my data in the same table because I get the info.
in an excel file and I just import it into a single table in Access. Another
employee here wants to keep the excel table.
I looked for the FourSelectsRelated code on the web and only found 1
question about it, but it said to go to some Qforms site that I would have to
pay for. I really don't want to do that. I have some code that kind of works.
It's the code below only there are multiple tables created. I think the code
below is what I would really want if I could just figure out how to do it for
sure. Any ideas? Thanks.
Andy
jamie61880 Guest
-
cgsj_usa@yahoo.com #8
Re: Drill Down dynamic drop down menus
Try just searching for JavaScript tools (related select lists)....you will probably be able to modify that code easier. Thanks.
Chris
cgsj_usa@yahoo.com Guest



Reply With Quote

