Solved

Multiple Dynamic Select Box

Posted on 2004-04-30
2
351 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 500 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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