Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multiple Dynamic Select Box

Posted on 2004-04-30
2
Medium Priority
?
354 Views
Last Modified: 2013-12-24
Hi.

I am trying to do a multiple dynmaic select box, involving 3 tables.  The first one of the drop-down boxes work and I get the second option, however, I am having problems retrieving the third option.

This is the criteria:
   1) User selects from list of publications- box 1
   
   2) Upon selecting from box 1, the list of available articles for that publication appear

   3) If there additional pages for the main page of the publication, then the user should be able to select from the sub page of 2 and get the corresponding add-on pages.

I reviewed a great tutorial from easycfm.com, but it does not seem to work for more than 2 tables:

      <cfif isDefined('form.select_Main_Group')>
            <cfset page.select_Main_Group=form.select_Main_Group>
      </cfif>
      
            <cfif isDefined('form.select_Sub_Group')>
            <cfset page.select_Sub_Group=form.select_Sub_Group>
      </cfif>
      
                  <cfif isDefined('form.select_Sub_Group2')>
            <cfset page.select_Sub_Group2=form.select_Sub_Group2>
      </cfif>
      
      
      <cfoutput>
      <form name="DropDown" method="post">
      <table cellpadding="2" cellspacing="2">
      <tr>
     <td class="boldtext" valign="top">Publication:</td>
      
                  <cfquery name="get_Main_Group" datasource="#application.dsn#">
                  SELECT storyCatID, category
                  from StoryCategories
                  </cfquery>
                              
                  <td class="text" valign="top">
            <select name="select_Main_Group" required="yes" onChange="this.form.submit()">
            <option>---Publication----</option>
                                          
                  <cfloop query="get_Main_Group">
                  <option value="#storyCatID#" <cfif isDefined('form.select_Main_Group')>
                  <cfif form.select_Main_Group eq "#storyCatID#">
                  selected</cfif></cfif>>#category#</option></cfloop></select>
                              </td>
                              
                              <!--- 2nd combo box --->
                                    <cfif isDefined('page.select_Main_Group')>                                    
                                    <cfquery name="get_Sub_Group" datasource="#application.dsn#">
                                          SELECT *
                                          FROM storyFeeds
                                          WHERE storyFeeds.storyCatID=#page.select_Main_Group#                                    
                                    </cfquery>
                                    
                                    <td valign="top" class="text">
                  <select name="select_Sub_Group" required="yes" onChange="this.form.submit()">
                                          <cfloop query="get_Sub_Group">
                  <option value="#storyID#" <cfif isDefined('form.select_Sub_Group')>
                  <cfif form.select_Sub_Group eq "#storyID#">
                  selected</cfif></cfif>>#title#</option></cfloop></select>                                                                                          
                                    </cfif>
                                    
                                    <!--- 3rd combo box --->
                                    <cfif isDefined('page.select_Sub_Group')>
                                    <cfquery name="get_Sub_Group2" datasource="#application.dsn#">
                                          SELECT *
                                          FROM storyFeeds, storyPages
                                          WHERE storyPages.storyID=#page.select_Sub_Group#            
                                    </cfquery>
                                    
                                    <td valign="top" class="text">
                                    <select name="select_Sub_Group2" required="No" >
                                          <option>-----Title----</option>
                                          <cfloop query="get_Sub_Group2">
                                                <option value="#storyID#">#page#</option>
                                          </cfloop>                                          
                              </select>                                                                                                
                                    </cfif>                                    
                                    </form>
                                    </cfoutput>                  
                              </td></tr></table>
                              </td>                                    
                        </tr>

0
Comment
Question by:synergeticsoul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 2000 total points
ID: 10964021
Have you tried the CF_ThreeRelatedSelects tag?

On Macromedia Extentions Exchange download the free cold fusion tag : (Note I shortened the URLs, but they are from the official Macromeida site)

3 Related Selects :
http://tinyurl.com/ys839
0
 

Author Comment

by:synergeticsoul
ID: 10976851
Thank You.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 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