Solved

Coldfusion cflayout and cftree tag

Posted on 2009-05-05
4
397 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
Question by:myselfrandhawa
  • 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 15

Author Comment

by:myselfrandhawa
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
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 …
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now