Solved

Coldfusion cflayout and cftree tag

Posted on 2009-05-05
4
410 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 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