?
Solved

Coldfusion cflayout and cftree tag

Posted on 2009-05-05
4
Medium Priority
?
415 Views
Last Modified: 2013-12-24
Hi Experts..

I am working on a website which has created four layouts using cflayout tags like TOP, LEFT,CENTER, BOTTOM, RIGHT.

Now in the left cflayout, i did <cfinclude template="navigation.cfm">

it loads perfectly.

now i have a cftree code in it which is below attached.

i want that when i click the tree item it should load the contents in the cflayoutarea CENTER area.

is that possible. if so how? can u guys provide me a way for doing it. i am just started playing with cflayout tag yet!

Please Help Me


<cfinvoke component="#request.cfcPath#.tools" method="getcategories" returnvariable="showcats"/>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<CFFORM ACTION="OpenItem.cfm" preservedata="yes" timeout="1000000"> 
<tr><td>
    <CFTREE NAME= "Categories" border="no" font="Verdana, Geneva, sans-serif" fontsize="11" highlighthref="yes" lookandfeel="MOTIF" HEIGHT="500" WIDTH="200" format="flash" notsupported="Please Install Flash to View all Categories" appendkey="no" align="middle"> 
    <CFLOOP QUERY="showcats"> 
        <CFTREEITEM VALUE="#ItemID#" PARENT="#ParentItemID#" DISPLAY="#catname#" EXPAND="no" img="images/folder.gif" href="showcategories.cfm?action=#itemID#"> 
    </CFLOOP> 
    </CFTREE></td></tr> 
</CFFORM> 
</table>

Open in new window

0
Comment
  • 3
4 Comments
 
LVL 1

Expert Comment

by:stmatth
ID: 24354716
The easiest way I found was to write a function that accepts the selected tree item value and uses ColdFusion.navigate to open showcategories.cfm in the desired cflayoutarea.

The href parameter in your <cftreeitem would contain "javascript:functionName(value);"
0
 
LVL 1

Expert Comment

by:stmatth
ID: 24354773
actually, if all you need is to open the page within the <cflayout area, all you need in the href param is:

javascript:ColdFusion.navigate('showcategories.cfm?action=#itemID#','cflayoutareaname');
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 24354913
'cflayoutareaname'. in this will i call the subcategies page by cfinclude
0
 
LVL 1

Accepted Solution

by:
stmatth earned 1500 total points
ID: 24354977
'cflayoutareaname represents whatever name you are going to give the cflayoutarea in which you wish the showcategories.cfm page to appear.

You shouldn't need to use <cfinclude> since the ColdFusion.navigate will populate the cflayoutarea for you
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

850 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