OK.... Your <CFAPPLICATION> tag MUST be in your Application.cfm (also observe case on this because it will kill you if you ever go Linux or are running MX and change it sometime in the future) unless you are including another file with it in for every page.
You can then set Application variables anywhere you like and they should be available to every page no matter how it is included (<CFINCLUDE> or <CFMODULE> or <CF_customtagname> or through <CFIMPORT> in MX). Gary Menzel IT Operations Brisbane -+- ABN AMRO Morgans Limited Level 29, 123 Eagle Street BRISBANE QLD 4000 PH: 07 333 44 828 FX: 07 3834 0828 [EMAIL PROTECTED] wrote on 06/20/2003 02:39:06 PM: > Yes, I've got cfapplication tag: > > <cfapplication name="Intranet" > sessionmanagement="Yes" > sessiontimeout="#CreateTimeSpan(0,1,30,0)#"> > > > >>> [EMAIL PROTECTED] 20/06/03 14:33:27 >>> > Where is your <cfapplication name="" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" > setdomaincookies="no" sessiontimeout="#createTimeSpan(0, 2, 0, 0)#" > clientstorage="#request.mainDSN#"> initialized? > In what page do you have your cfapplication tag? And is this included throughout the whole site? Probably best to initialize it > in your application.cfm file. > > Taco > -----Original Message----- > From: George Lu [mailto:[EMAIL PROTECTED] > Sent: Friday, 20 June 2003 2:19 PM > To: CFAussie Mailing List > Subject: [cfaussie] application.cfm > Hi, > > I've got application variables defined in application.cfm: > > <cfscript> > application.root = "/Intranet"; > application.dsn = "Intranet"; > </cfscript> > > I can use these variables in index.cfm and some include files like LeftNav.cfm: > > coding... > > <cfoutput> > <TABLE WIDTH="150" CELLSPACING="0" CELLPADDING="0" BORDER="0"> > <TR> > <TD> > <cfif isDefined("request.pageTitle") AND request.pageTitle IS "Welcome to the Intranet"> > <span CLASS='leftnavon'>Intranet Home</span> > <cfelse> > <A HREF="#application.root#/index.cfm" CLASS='leftnav'>Intranet Home</A> > </cfif><BR> > </TD> > </TR> > <TR> > <TD BGCOLOR="##999999"><IMG SRC="#application.root#images/spacer.gif" WIDTH="1" HEIGHT="1" BORDER="0"></TD> > </TR> > ....... > > However, when I use them in another include files header.cfm: > > coding... > > <!--- Intranet header include file header.cfm ---> > <HTML><HEAD> > <cfoutput> > <TITLE><cfif isDefined("request.siteTitle")>#request.siteTitle#<cfelseif isDefined("request.welcomemsg")>#request.welcomemsg#</cfif> > <cfif isDefined("request.pageTitle")> - #request.pageTitle#</cfif> > </TITLE> > <link rel="stylesheet" type="text/css" href="#application.root#/_Scripts/styleguide2.css"> > </cfoutput> > ....... > > Coldfusion throws an error: > > > Element ROOT is undefined in APPLICATION. > > > > The error occurred in C:\Inetpub\wwwroot\Intranet\includes\header.cfm: line 7 > > 5 : <cfif isDefined("request.pageTitle")> - #request.pageTitle#</cfif> > 6 : </TITLE> > 7 : <link rel="stylesheet" type="text/css" href="#application.root#/_Scripts/styleguide2.css"> > 8 : </cfoutput> > 9 : </HEAD> > > I don't understand why it's working in one template but not another? Please Help! > > Thanks. > > (sorry for the long message) > > George > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > > AMES (Adult Multicultural Education Services) > www.ames.net.au > > > Disclaimer > ********************************************************************** > This email and any attachments may be confidential. > If received in error, please contact us and delete all copies. > Before opening or using attachments you should check them for viruses > or defects. > Regardless of any loss, damage or consequence, whether caused by the > negligence of the sender or not, resulting directly or indirectly from > the use of any attached files our liability is limited to resupplying > any affected attachments. > Any representations or opinions expressed are those of the individual > sender, and not necessarily those of Adult Multicultural Education > Services (AMES). > > ********************************************************************** > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > > ---------------------------------------------------------------------------- > This email, together with any attachments, is intended for the named > recipient(s) only and may contain privileged and confidential information. If > received in error, please inform the sender as quickly as possible and delete > this email and any copies from your computer system network. > > If not an intended recipient of this email, you must not copy, distribute or > rely upon it and any form of disclosure, modification, distribution and/or > publication of this email is prohibited. > > Unless stated otherwise, this email represents only the views of the sender and > not the views of the Queensland Government. > ---------------------------------------------------------------------------- > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > > > AMES (Adult Multicultural Education Services) > www.ames.net.au > > > Disclaimer > ********************************************************************** > This email and any attachments may be confidential. > If received in error, please contact us and delete all copies. > Before opening or using attachments you should check them for viruses > or defects. > Regardless of any loss, damage or consequence, whether caused by the > negligence of the sender or not, resulting directly or indirectly from > the use of any attached files our liability is limited to resupplying > any affected attachments. > Any representations or opinions expressed are those of the individual > sender, and not necessarily those of Adult Multicultural Education > Services (AMES). > > ********************************************************************** > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ **************************************************************************** If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments. This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information. If you have received this email in error, we request you contact ABN AMRO Morgans Limited immediately by returning the email to [EMAIL PROTECTED] and destroy the original. We will refund any reasonable costs associated with notifying ABN AMRO Morgans. This email is confidential and may contain privileged client information. ABN AMRO Morgans has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted. Materials may also be transmitted without the knowledge of ABN AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not accept liability for the results of any actions taken or not on the basis of the information in this report. ABN AMRO Morgans Limited and its associates hold or may hold securities in the companies/trusts mentioned herein. Any recommendation is made on the basis of our research of the investment and may not suit the specific requirements of clients. Assessments of suitability to an individual's portfolio can only be made after an examination of the particular client's investments, financial circumstances and requirements. **************************************************************************** --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
