Solved

CFTree and Frames problem

Posted on 2000-02-23
12
324 Views
Last Modified: 2013-12-24
I have a CFTree in a three frame page with the target set to the larger frame. When trying the links in the tree, in NS4.7, it will either open the link in a new window or it breaks out of the frames in the same window.

If I name the target "_parent" or "_main", it opens in the same window, anything else, it opens a new window.

It works fine in IE5.

{I don't have access to the code right now as I am in a FastTrack to ColdFusion class and not at work!}
0
Comment
Question by:EddieShipman
  • 7
  • 5
12 Comments
 
LVL 5

Expert Comment

by:nathans
Comment Utility
When you can post the code so we can work on it.

I wish I could have taken a CLASS on ColdFusion......  :(

Nathan Stanford
Mr. ColdFusion
==========================
Check out my e-ZINE
ColdFusion Tips Plus
http://www.nsnd.com/cftips
or send a blank email to
subscribe-cftips@nsnd.com
0
 
LVL 26

Author Comment

by:EddieShipman
Comment Utility
I'm trying to get a co-worker to send it to my web-based mail account so I
can post it. Maybe later today...
0
 
LVL 5

Accepted Solution

by:
nathans earned 100 total points
Comment Utility
Here is a sample that works:
1. Frame File
2. Top Frame
3. Tree Frame
4. Body Frame
5. New Frame for Body



1. Frame File
============= index.cfm ==============
<!-- frames -->
<frameset  rows="100,*">
    <frame name="top" src="top.cfm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0" noresize>
    <frameset  cols="250,*">
        <frame name="tree" src="tree.cfm" marginwidth="5" marginheight="0" scrolling="auto" frameborder="0">
        <frame name="BODY" src="body.cfm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
    </frameset>
</frameset>

=====================================
2. Top Frame
=====================================

<html>
<head>
      <title></title>
</head>

<body>

<font size="+3">TITLE OF PAGE</font>

</body>
</html>

=====================================

3. Tree Frame
=====================================

<HTML><HEAD>
    <TITLE>MyFamily</TITLE>
</HEAD><BODY bgcolor="ffffff">
<FONT size="+2"><B>MyFamily</B></FONT>
<P>
<CFQUERY name="GetTreeData" dataSource="test">
    SELECT DISTINCT people.State, City,Name
    FROM people
</CFQUERY>
<CFFORM action="MyFamily.cfm" method="POST" target="BODY">
<CFTREE name = "Tree"
      height = "200"
      width = "230"
      highlightRef = "no"
      >
      <CFTREEITEM value="0" display="MyFamily" expand="yes">
      <CFSET CurGroup1 = "">
      <CFLOOP query="GetTreeData">
            <CFIF CurGroup1 is not State>
                  <CFTREEITEM value="#State#" parent="0" display="#State#" img="Folder" expand="no">
                  <CFSET CurGroup1 = State>
                  <CFSET CurGroup2 = ''>
            </CFIF>
            <CFIF CurGroup2 is not City>
                  <CFTREEITEM value="#City#" parent="#State#" display="#City#" img="Folder" expand="no">
                  <CFSET CurGroup2 = City>
                  <CFSET CurGroup3 = ''>
            </CFIF>
            <CFTREEITEM value="#Name#" parent="#City#" display="#Name#" img="Document" expand="no">
      </CFLOOP>
</CFTREE>
<P>
<INPUT type="Submit" value="Display">
</CFFORM>

</BODY></HTML>

=====================================

4. Body Frame
=====================================

<html>
<head>
      <title>Untitled</title>
</head>
<body>
Here is where the information is going to go.
</body>
</html>

=====================================

5. New Frame for Body
=====================================
<html>
<head>
      <title>Untitled</title>
</head>
<body>
<cfoutput>
<b>#TREE.NODE#</b><br>
</cfoutput>
</body>
</html>

=====================================

Nathan Stanford
Mr ColdFusion
=====================================
ColdFusion Tips Plus
FREE e-ZINE
http://www.nsnd.com/cftips
or subscribe by sending a blank email to
subscribe-cftips@nsnd.com

0
 
LVL 26

Author Comment

by:EddieShipman
Comment Utility
Where does the new frame come in???
0
 
LVL 5

Expert Comment

by:nathans
Comment Utility
load each of these files and test it out. If you can't I will do it on my server.

when they select the final item and click on submit.  then it goes over to the new frame.

However I think I could make it where when you select it it does the submit.
0
 
LVL 26

Author Comment

by:EddieShipman
Comment Utility
I was unable to get the frame code sent
to me but here is the tree code:
The file CFFAQ_Template is the file that
has the frames in in similar to your frames page. The body frame is called _MAIN.

<html>
<head>
      <title>eMDs FAQ</title>
</head>
  <body>  
    <CFFORM ACTION="CFFAQ_Template.CFM" METHOD="POST" NAME="FAQs" TARGET="_Main">
      <CFTREE NAME="FAQTREE" HIGHLIGHTHREF="YES" HEIGHT="585" WIDTH="275" HSCROLL="NO" VSCROLL="NO">
        <CFTREEITEM VALUE="eMDs FAQ" IMG="FOLDER" EXPAND="YES" TARGET="_Main">
        <CFTREEITEM VALUE="Sales" PARENT="eMDs FAQ" HREF="sales.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Software" PARENT="Sales" IMG="DOCUMENT" HREF="salessoftware.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Hardware" PARENT="Sales" IMG="DOCUMENT" HREF="saleshardware.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Technical" PARENT="eMDs FAQ" HREF="technical.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Network" PARENT="Technical" IMG="DOCUMENT" HREF="technicalnetwork.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Hardware" PARENT="Technical" IMG="FOLDER" HREF="technicalhardware.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Specifications" PARENT="Hardware" IMG="DOCUMENT" HREF="technicalhardwarespecs.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="Hardware" IMG="DOCUMENT" HREF="technicalhardwareinstall.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Implementation" PARENT="eMDs FAQ" IMG="FOLDER" HREF="implementation.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Training" PARENT="Implementation" IMG="DOCUMENT" HREF="implementationtrain.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Support" PARENT="Implementation" IMG="DOCUMENT" HREF="implementationsupport.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Applications" PARENT="eMDs FAQ" IMG="FOLDER" TARGET="_Main">
          <CFTREEITEM VALUE="topsChart" PARENT="Applications" IMG="FOLDER" HREF="applicationChartBeg.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Beginning With topsChart" PARENT="topsChart" IMG="FOLDER" HREF="applicationChartBeg.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Entering New Patients" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartEnter.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Opening Charts & Notes" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartOpen.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Messages" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartMessages.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Creating SOAP Notes" PARENT="topsChart" IMG="FOLDER" TARGET="_Main">
              <CFTREEITEM VALUE="General Template Information" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartGenTemplate.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Subjective" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-S.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Objective" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-O.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Assessment" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-A.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Plan" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-P.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Using ICD-9 Search" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartICD-9.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Writing Prescriptions" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartRx.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Health Summary" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartHealth.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Chart View Functions" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartView.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartInstallation.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Miscellaneous" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartMisc.htm" TARGET="_Main">
          <CFTREEITEM VALUE="topsBill" PARENT="Applications" IMG="FOLDER" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillInstall.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Demographics" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillDemographics.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Posting" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillPost.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Claims" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillClaim.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Reports" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillReport.htm" TARGET="_Main">
<!---            
            <CFTREEITEM VALUE="Reference" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
            <CFTREEITEM VALUE="Set Up" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
            <CFTREEITEM VALUE="Miscellaneous" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
           
 --->          <CFTREEITEM VALUE="topsSchedule" PARENT="Applications" IMG="DOCUMENT" HREF="applicationSchedule.htm" TARGET="_Main">
          <CFTREEITEM VALUE="topsSearch ICD-9" PARENT="Applications" IMG="DOCUMENT" HREF="applicationSearch.htm" TARGET="_Main">
      </CFTREE>
    </CFFORM>
  </body>
</html>
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Expert Comment

by:nathans
Comment Utility
TARGET="BODY"
0
 
LVL 5

Expert Comment

by:nathans
Comment Utility
What is the NAME of the Frame you are wanting to replace OR are you wanting to replace the Whole Page?
0
 
LVL 26

Author Comment

by:EddieShipman
Comment Utility
I want the links in the tree to display n the _MAIN frame. But, like I said, in
NS it either breaks out of the frame and displays in the entire window or opens a new window depending upon the target.

I tried the source you presented with my CFTree.cfm as the src for the second frame and the document is coming up EMPTY! No frames, nothing!!!



0
 
LVL 5

Expert Comment

by:nathans
Comment Utility
If the name of the FRAME is MAIN then you need to try target="MAIN"

I'm not sure if MAIN is a reserved word or not but if that does not work try...

Changing the Name of the Frame to
MAIN1

then

target="MAIN1"


NO '_' in front of it.
0
 
LVL 5

Expert Comment

by:nathans
Comment Utility
Oh yes by the way it is CASE SENSITIVE as well.

I have tested this again and it works...

0
 
LVL 26

Author Comment

by:EddieShipman
Comment Utility
I built another frame unit with the frames wizard and it worked in NS and IE.

The code looks EXACTLY the same as my other code, word for word, exact punctuation too.

Don't know why it wouldn't work but it does now no matter what I call the main frame.

Thanks...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
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.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

744 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

11 Experts available now in Live!

Get 1:1 Help Now