Ask a Question related to Macromedia ColdFusion, Design and Development.
-
jbaud #1
Dymanic Query and CFIF Problems
Problem:
I have an application where I have one access table with the following fields:
autonum, cca_index, cca_category, wt_index, wt_category. What I need to have
displayed dymanically is:
1st the user choices "CCA_Category - which is a drop down list" and once the
user chooses the "CCA Category" I need it to display only a certain range of
"WT_Category", so the user can make their 2nd choice - currently it display no
drop down for "WT Category".
Here's some code I've been working with but grrrrrr....i can't get it to do
what I want....Any ideas I would be grateful.....Thanks....J
<!--- Query needed to display CCA (Core Competency Area Categories) --->
<CFQUERY NAME="qry_cca" datasource="coers">
SELECT index, cca_category
FROM cca_wt_tbl
</CFQUERY> --->
<!--- Query needed to display WT (Work Team Categories) --->
<CFQUERY NAME="qry_wt" datasource="coers">
SELECT index, wt_category
FROM cca_wt_tbl
</CFQUERY>
<SELECT NAME="cca" VALUE="">
<OPTION VALUE="" selected>Select CCA
<CFOUTPUT QUERY="qry_cca">
<OPTION VALUE="#qry_cca.cca_category#">#qry_cca.cca_catego ry#
</OPTION>
</CFOUTPUT>
<input type="hidden" name="qry_cca.index" value="#qry_cca.index#">
</SELECT>
<CFSET qry_cca.index = qry_wt.index>
<SELECT NAME="cca" VALUE="">
<OPTION VALUE="" selected>Select CCA
<CFOUTPUT QUERY="qry_cca">
<OPTION VALUE="#qry_cca.cca_category#">#qry_cca.cca_catego ry#
</OPTION>
</CFOUTPUT>
<input type="hidden" name="qry_cca.cca_index" value="#qry_cca.cca_index#">
</SELECT>
<CFSET qry_cca.cca_index = qry_wt.wt_index>
</TD>
<TD>
<CFIF (qry_cca.cca_index EQ "A" AND qry_wt.index EQ "A")>
<SELECT NAME="wt" VALUE="">
<OPTION VALUE="" selected>Select WT
<CFOUTPUT QUERY ="qry_wt">
<OPTION VALUE="#qry_wt.wt_category#">#qry_wt.wt_category#
</OPTION>
</CFOUTPUT>
</SELECT>
<CFELSEIF (qry_cca.cca_index EQ "B" AND qry_wt.index EQ "B")>
<SELECT NAME="wt" VALUE="">
<OPTION VALUE="" selected>Select WT
<CFOUTPUT QUERY ="qry_wt">
<OPTION VALUE="#qry_wt.wt_category#">#qry_wt.wt_category#
</OPTION>
</CFOUTPUT>
</SELECT>
</CFIF>
jbaud Guest
-
Creating A Dymanic CFMAIL Tag
I am creating an automatic email system for several clients; some which have an e-mail server we can use and some that requires a username and... -
CFIF Statement problems
I am trying to write a cfif statement, which shows a form only if the statemnt acts true. It is a 3 part statement, the first two parts appear to... -
Using <CFIF> on query results
I'm using Coldfusion with SQL databases to develop a dynamic calendar. The issue I have is how to get it to know if a particular day is a Holiday. ... -
Panel and dymanic table
On a run time I am generating a table inside a panel. The table alsways generated to the left and I wanted to be in canter of the panel. How do I... -
Dymanic load
Hi im am trying to build a menu. and i wont to load files into this menu dynamic. As base i use Term_ANSIMenu-0.02 This module builds a meny from...



Reply With Quote

