Hi all,
Not sure if this is possible, but is there a way of getting the code from a
page prior to comitting
the HTML to page.
i.e. if page.cfm looked like this
cfset myoutput = 'hello world'
pcfoutput#myoutput#/cfoutputp
When loaded, I would get the HTML phello world/p which I could run more
: Richard Cooper [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 10, 2007 7:39 AM
To: CF-Talk
Subject: get code prior to commit
Hi all,
Not sure if this is possible, but is there a way of getting the code from a
page prior to comitting
the HTML to page.
i.e. if page.cfm looked like this
cfset myoutput
Hey Richard,
cfsavecontent variable=myContent
cfset myoutput=hello world /
pcfoutput#myoutput#/cfoutput/p
/cfsavecontent
!--- not to be morbid, first thing i thought of ---
cfset replace(myContent, hello, goodbye, cruel) /
cfoutput#myContent#/cfoutput
-Joe
On May 10, 2007, at 7:39 AM,
As previously mentioned, cfsavecontent is a good approach. Another
alternative is the onRequest method within Application.cfc. You'll have to do a
little reading on this function, but the basic idea is that the end result of
your page request is delivered by onRequest. If onRequest doesn't
Not quite what I was looking for. I don't want to have to change the code on
whateverpage.cfm, maybe just add get the output via onRequestEnd.cfm or
onRequest function of Application.cfc
I was hoping that some thing like GetPageContext() might have a method that
holds all of the content?
OK, I've got a way of doing it but I reckon there must be a better way as I
think it will gobble up resources
page.cfm
[code]
html
head
titleHello/title
meta http-equiv=Content-Type content=text/html; charset=utf-8
/head
body
cfset myvar = 'hello world'
cfoutput#myvar#/cfoutput
/body
/html
6 matches
Mail list logo