Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to pass a numeric key variable with a name selected on a Cftree

Status
Not open for further replies.

NewProgrammer1234

Programmer
Sep 4, 2001
7
US
I need to pass a numeric key variable with a name selected on a cftree selection. I know there is a very easy fix, I just don't know what it is. Thanks for your help. Here is my code:


<CFFORM NAME=&quot;form&quot;
ACTION=&quot;treat_tactic.cfm&quot;
METHOD=&quot;Post&quot;>
<CFTREE NAME=&quot;tree1&quot;
REQUIRED=&quot;yes&quot;
HSCROLL=&quot;no&quot;
vSCROLL=&quot;yes&quot;
BORDER=&quot;yes&quot;
HEIGHT=&quot;230&quot;
Width=&quot;500&quot;
MESSAGE=&quot;Please select a tactic from the tactic selection tree!&quot; >
<CFTREEITEM VALUE=&quot;EPA_ChemGroup_ToxicEffect, Name&quot;
QUERY=&quot;Tactic&quot;
QUERYASROOT=&quot;EPA targeted tactics&quot;
IMG=&quot;element,folder,document&quot;>
</CFTREE>


<BR><INPUT TYPE=&quot;Submit&quot; VALUE=&quot;Select&quot;>
</CFFORM>

 
If I understand your question there is indeed a very simple answer. Try this.


<CFTREEITEM VALUE=&quot;EPA_ChemGroup_ToxicEffect_ID, Name_ID&quot;
Display=&quot;EPA_ChemGroup_ToxicEffect, Name&quot;
QUERY=&quot;Tactic&quot;
QUERYASROOT=&quot;EPA targeted tactics&quot;
IMG=&quot;element,folder,document&quot;
Href=&quot;EPAChemGroup.cfm,Name.cfm&quot;>

Use the Key ID's for the Value=&quot; ...&quot; and the part you want visible for the Display=&quot;...&quot; part.

Then the Key value will be sent to the coresponding URL in the Href=&quot;...&quot; field.

I believe it sends it on the URL as cftreeitemkey so you would access it from your recieving page as

#url.cftreeitemkey#

Have fun...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top