In index.cfm, I put a file called act_frame_me.cfm as the first included
file for any fuseaction that should be framed. It just contains JavaScript
to confirm whether or not it is the top frame. If it is the top frame it
redirects to MAIN fuseaction, which calls the frames. The original
fuseaction is passed in the variable, centerFrameSource.
Here's some samples from my code:
----
index.cfm looks like:
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="Users">
<cfinclude template="act_frame_me.cfm">
<cfinclude template="qry_users.cfm">
<cfinclude template="dsp_users.cfm">
</cfcase>
<cfcase value="main">
<cfinclude template="fra_mother.cfm">
</cfcase>
....
</cfswitch>
----------
act_frame_me.cfm looks like this:
<script language="JavaScript">
<cfoutput>
if (top.location == location )
top.location =
'index.cfm?fuseaction=main¢erFrameSource=#attributes.fuseaction#¶m1=
#param1#¶m2=#param2#';
</cfoutput>
</script>
------
fra_mother.cfm looks like this:
<cfparam name="centerFrameSource" default="#attributes.fuseaction#"> <!---
this line belongs in app_locals.cfm --->
<frameset frameborder="no" cols="160,*" framespacing="0">
<cfoutput>
<frame name="contents" src="index.cfm?fuseaction=Contents"
marginwidth="1" marginheight="1" scrolling="auto" ></frame>
<frame name="work"
src="index.cfm?fuseaction=#attributes.CenterFrameSource#¶m1=#param1#&par
am2=#param2#" marginwidth="1" marginheight="1"></frame>
</cfoutput>
</frameset>
-----Original Message-----
From: Andrew Tollervey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 3:09 PM
To: Fusebox
Subject: Re: Fusebox, Fuseactions and Frames
Hello All!
I understand how fusebox and frames work. However, how do I get the fusebox
to recognise when a fuseaction has been processed outside the frames and
then redirected the user back into the frames while still keeping the
original fuseaction intact? If I type index.cfm after the domain name, the
frames are loaded as normal. However, if I type index.cfm?fuseaction=login
(or whatever) directly into the browser, the page gets loaded outside the
frames. Any ideas/solutions for this? Solving this problem would be very
handy for those people coming to a site from search engines who miss the
home page and go directly to a fuseaction page .
Thanks,
Andrew
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists