Ask a Question related to Coldfusion Database Access, Design and Development.
-
jbaud #1
CFSELECT HELP!
What I am trying to do seems simple but I'm going crazy! I need have a page
where I have the user "Select Options" from a drop down box and when that item
is choosen the next drop down box is populated and the user then selects that
information but the tricky part is I only need a portion of the information to
show up. For Example (Selection A has 5 options and Selection B has 25 options
- but what I need to have displayed is Selection A and the 1st (5) of Selection
B - so I'm trying to equal my "WHERE" clause but no luck) I have posted some
code below but it isn't working. Possibly my database isn't setup correctly to
make this function work (current db setup is the following fields (autonum,
selectiona_id, selectiona_category, selectionb_id, selectionb_category), so if
anyone has ideas I REALLY need the help :-) Should I be using CFSELECT?????
Thanks.....:confused;
<!--- Query needed to display CCA (Core Competency Area Categories) --->
<CFQUERY NAME="qry_cca" datasource="coers">
SELECT cca_index, cca_category
FROM cca_tbl
ORDER BY cca_index
</CFQUERY>
<CFQUERY NAME="qry_wt" datasource="coers">
SELECT autonum, cca_index, cca_category, wt_index, wt_category
FROM cca_wt_tbl
WHERE cca_index = wt_index
</CFQUERY>
<FORM NAME="selection" METHOD="POST">
<TABLE WIDTH="100%">
<TR VALIGN="TOP">
<TD>
<SELECT NAME="cca" size="1">
<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>
</TD>
<TD>
<SELECT NAME="wt" VALUE="">
<CFSET qry_wt.cca_index = qry_wt.wt_index>
<CFIF (qry_wt.cca_index EQ "A" AND qry_wt.index EQ "A")>
<OPTION VALUE="" selected>Select WT
<CFOUTPUT QUERY ="qry_wt">
<OPTION VALUE="#qry_wt.wt_category#">#qry_wt.wt_category#
</OPTION>
</CFOUTPUT>
</SELECT>
<SELECT NAME="wt" VALUE="">
<CFELSEIF (qry_wt.cca_index EQ "B" AND qry_wt.index EQ "B")>
<OPTION VALUE="" selected>Select WT
<CFOUTPUT QUERY ="qry_wt">
<OPTION VALUE="#qry_wt.wt_category#">#qry_wt.wt_category#
</OPTION>
</CFOUTPUT>
</SELECT>
</CFIF>
</TD>
</TR>
</TABLE>
jbaud Guest
-
CFSELECT Help!!
I have a flash form page that when an item is selected in a <cfselect> field needs to populate five other fields on the form. Please help me!!! -
cfselect options dependent on choice from other cfselect
I have 2 cfselects. 1st is category, 2nd is sub category. both are populated from database queries, but the options from the sub cat vary based... -
cfselect how too?
I have a CFSELECT tag in a form the form submits an pull back a graph of the customers sales. It works but I want the CFSELECT tag to show the name... -
cfselect goes up instead of down
Is there a control I'm missing to make cfselect go down instead of up? Take a look at this and click on the 'Aprilia' select box. It goes up and... -
CF7 BIND CFSELECT to populate a 2nd & 3rd CFSELECT
Please could some show code of how this is done: CF7 - Flash page Question: How do I bind these cfselect dropdown lists to one another as per the...



Reply With Quote

