• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

CFTree and Frames problem

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
Eddie Shipman
Asked:
Eddie Shipman
  • 7
  • 5
1 Solution
 
Nathan Stanford SrSenior ProgrammerCommented:
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
 
Eddie ShipmanAll-around developerAuthor Commented:
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
 
Nathan Stanford SrSenior ProgrammerCommented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Eddie ShipmanAll-around developerAuthor Commented:
Where does the new frame come in???
0
 
Nathan Stanford SrSenior ProgrammerCommented:
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
 
Eddie ShipmanAll-around developerAuthor Commented:
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
 
Nathan Stanford SrSenior ProgrammerCommented:
TARGET="BODY"
0
 
Nathan Stanford SrSenior ProgrammerCommented:
What is the NAME of the Frame you are wanting to replace OR are you wanting to replace the Whole Page?
0
 
Eddie ShipmanAll-around developerAuthor Commented:
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
 
Nathan Stanford SrSenior ProgrammerCommented:
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
 
Nathan Stanford SrSenior ProgrammerCommented:
Oh yes by the way it is CASE SENSITIVE as well.

I have tested this again and it works...

0
 
Eddie ShipmanAll-around developerAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now