3 dropdown menus

Posted on 2007-10-05
Last Modified: 2013-12-24
Hallo experts.
I have found this solution:
 from exp. TallerMike.
What can be the cfquery for this example?.(......>You would need to select the data for all 3 fields all at once<........).
(i use cf8)
Question by:Panos
    1 Comment
    LVL 4

    Accepted Solution

    I don't think the accepted solution really covers what was needed for that question, but let me see if I can complete it.

    To do it this way without using an AJAX solution (which is what this screams for) you will need 3 queries. In the header of the page you will need to generate 2 sets of associative JavaScript arrays for the second two drop downs.

          aProducts = new Array();
          <cfoutput query="qProducts" groupBy="vendorName">
                aProucts["#qProducts.vendorId#"] = new Array();
                      aProducts["#qProducts.vendorName#"].push({id:"#qProducts.productId#", name:"#qProduct.productName#"});

    Then on the onChange event in the first drop down you would need a function that would grab what the newly selected vendor was. In case your wondering thats an object I'm pushing to the Array in the generated JavaScript code. so you when adding options to the select box you can set the value = to aProducts["vendorA"][20].id and the text = to aProducts["vendorA"][20].name...

    I hope this helps!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
    Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them ( . I did keep the main js functions but made sever…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now