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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help me with CFTREE 1

Status
Not open for further replies.

kuolung

Programmer
Sep 2, 1999
51
US
i follow all the help and examples how to generate CFTREE, but I couldn't find where i can have the tree folder clickable and expanding to the next level and so on.

For example, I want to have a Close Folder, whenever I click on it, it'd change to Open Folder and list all the CFTREEITEM within that folder. Do i need to action.cfm page for the clickable CFTREE folder????

please help!!!! thank you.!!!!!
 
Use the parent attribute of the <cftreeitem> tag to create expandable trees with folders and such. Here is a simple example that you should be able to get working by pasting it into a blank document and putting some <cfform> tags around it:

<cftree name=&quot;ATree&quot; height=&quot;150&quot; width=&quot;240&quot;>
<cftreeitem value=&quot;Level1.1&quot; display=&quot;Level 1.1&quot;>
<cftreeitem value=&quot;Level2.1&quot; display=&quot;Level 2.1&quot; parent=&quot;Level1.1&quot;>
<cftreeitem value=&quot;Level3.1&quot; display=&quot;Level 3.1&quot; parent=&quot;Level2.1&quot;>
<cftreeitem value=&quot;Level1.2&quot; display=&quot;Level 1.2&quot;>
<cftreeitem value=&quot;Level2.2&quot; display=&quot;Level 2.2&quot; parent=&quot;Level1.2&quot;>
</cftree>

By setting the parent attribute equal to the value of the tree item it's dependant of it will work. This example will create a three level tree. Andrew
 
thank you so much!! you're one of the best
smiletiniest.gif
 
sorry, one for question. i would like to change the default folder to plus.gif and minus.gif images. how do change plus.gif to minus gif, when the plus.gif (folder) got clicked and expanded??? thankssssssssssssssssssss
 
You can use the img and imgopen attributes to accomplish this. Simply change your <cftreeitem> tag:

<cftreeitem value=&quot;Level1.1&quot; display=&quot;Level 1.1&quot; img=&quot;image/plus.gif&quot; imgopen=&quot;image/minus.gif&quot;> Andrew
 
Andrew, again thanks a ton!!!!!!!
you're so great!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top