Solved

Coldfusion cflayout and cftree tag

Posted on 2009-05-05
4
409 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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