Same here... I set all my request variables in one file then include it via
Application.cfm. the request vars are available anywhere and everywhere
throughout the entire application this way.

If you have these two files...

<!--- Request.cfm--->
<cfset request.testvar = "request variable">

<!--- index.cfm --->
<cfinclude template="request.cfm">
<cfoutput>#request.testvar#</cfoutput>


Index.cfm should just display "request variable"

This SHOULD definitely work. If it's not, then there is something wrong
somewhere else. Were you getting test not defined in request scope errors?
Or any kind of error for that matter...

-----Original Message-----
From: Ben Doom [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 03, 2004 1:26 PM
To: CF-Talk
Subject: Re: How to use Request scope?!

Except that I do exactly what you said didn't work all the time.  I 
routinely create request or variable scoped vars in one include to be 
used in another.  The includes are serial, not nested.

So I don't know what your original problem was, but I'd be careful to 
check and make sure that the value being used in the second include is 
actually what's being set in the first, not in the index.

--Ben

Ian Sheridan wrote:
> Well let me be a little bit more descriptive. 
> 
> I have an "index.cfm" page that includes two files. I was then setting
> the REQUEST variable *in* the first include. In the second include I
> would then look for it. This did not work.
> 
> I now set the REQUEST variable in the "index.cfm" file first. Then set
> it in the first include and read it in the second include. This works.
> 
> So I gather from this experience that request is *inherited* from the
> parent document.
> 
> Application.cfm
> ----- index.cfm
> ---------- include.cfm
> 
> It only gets inherited. there is no creating it in a child include/file.
> 
> Ian




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=37

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183301
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to