Drill Down dynamic drop down menus

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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,...
    2. 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...
    3. 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...
    4. 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...
    5. 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)...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

  8. #7

    Default 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

  9. #8

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139