[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Cold Fusion CFSELECT binding question

Asked by SiriusPhil in ColdFusion Application Server

I am currently working on developing a photo album for our local volunteer fire department (www.soundbeachfire.org). I am getting hung up on a cfselect form binding on the applications admin page. Essentially, I have two drop down lists.

DROP DOWN LIST 1 (CATEGORIES): This list contains a list of categories and sub-categories for the album. I am limiting the amount of subcategories to 4 levels deep. When the page renders, it displays the categories in a fashion such as:

-- Please Select --
Category 1
Category 2
... Sub Category A
... Sub Category B
...... Sub Category B1
...... Sub Category B2

The Query for the above is as follows:

<cfquery name="getCategories" datasource="DSN">
select L0.catid AS L0_catid
       , L0.title as L0_title
     , L1.catid AS L1_catid
     , L1.title as L1_title
     , L2.catid as L2_catid
     , L2.title as L2_title
     , L3.catid as L3_catid
     , L3.title as L3_title
  from t_media_cats as L0
left outer
  join t_media_cats as L1
    on L1.parent = L0.catid
left outer
  join t_media_cats as L2
    on L2.parent = L1.catid
left outer
  join t_media_cats as L3
    on L3.parent = L2.catid
 where L0.parent is null
order by L0_title
     , L1_title
     , L2_title
     , L3_title
</cfquery>

On the HTML side, the select statement is (I cut down the sub-categories to just 3 levels):

<cfselect name="CatID" id="CatID"">
          <cfoutput query="getCategories" group="L0_title">
            <option value="#getCategories.L0_catid#">#getCategories.L0_title#</option>
            <cfif getCategories.L1_catid NEQ ''>
            <cfoutput>
            <option value="#getCategories.L1_catid#">... #getCategories.L1_title#</option>
            </cfoutput>
            </cfif>
            <cfif getCategories.L2_catid NEQ ''>
            <cfoutput>
            <option value="#getCategories.L2_catid#">... #getCategories.L2_title#</option>
            </cfoutput>
            </cfif>
          </cfoutput>
        </cfselect>

** I removed any of the binding attempts to leave clean code that shows the working model without the binding **

DROP DOWN LIST 2 (ALBUMS): This is where I am now stuck. The second drop down lost contains a list of all of the albums in a specific category. I want to bind this cfselect to the previous list so that only the albums in a selected category appear.

The query for this is:

<cfquery name="getAlbums" datasource="DSN">
SELECT albumid, title
FROM t_media_albums
ORDER BY title ASC
</cfquery>

THE PROBLEM

I am able to bind a simple query (one level of categories) from the first drop down list but can not figure out a way to create the bind using the method of displaying sub-categories as I have designed. I have tried a few different solutions but am unable to come up with a way to fix the problem.

I appreciate any help and feedback.
[+][-]04/18/08 11:38 AM, ID: 21388483Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ColdFusion Application Server
Sign Up Now!
Solution Provided By: chair9design
Participating Experts: 3
Solution Grade: A
 
[+][-]02/08/08 07:26 AM, ID: 20851060Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/08/08 10:30 AM, ID: 20852665Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/08/08 11:28 AM, ID: 20853183Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/09/08 05:58 AM, ID: 20857254Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/02/08 09:41 PM, ID: 21491337Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/12/09 10:19 AM, ID: 23624928Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/12/09 10:19 AM, ID: 23624929Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628