I forgot to mention to take the string and write it to a file then can call the file 
using cfinclude.

-----Original Message-----
From: Schreck, Tom 
Sent: Monday, July 22, 2002 9:17 AM
To: [EMAIL PROTECTED]
Subject: RE: Getting CF to parse tags stored in variables


Try creating a string containing the cf code you wish to use at a later date.  Here's 
an example of what I mean:

<cfset variables.strStruct3 = '
        <cfscript>
                variables.strWDDX = "#wddxContentList#";
        </cfscript>

        
        <cfwddx action="WDDX2CFML" input="##variables.strWDDX##" 
output="qry_GetContentList">
        <cfscript>
                variables.dtStart = CreateODBCDate(DateAdd(''D'', 1, now()));
                variables.dtEnd = CreateODBCDate(DateAdd(''D'', -1, now()));           
         
        </cfscript>     
        
        <cfoutput>
                <cfloop query="qry_GetContentList">
                        <cfif (qry_GetContentList.dtStart LT variables.dtStart) AND 
((qry_GetContentList.dtEnd GT variables.dtEnd) OR len(qry_GetContentList.dtEnd) EQ 0)>
                                ##qry_GetContentList.txtContent##<br>
                        </cfif>
                </cfloop>
        </cfoutput>     
        '>

Note the double ## signs around variable names to escape the CF processing.

Hope this helps 

Tom

-----Original Message-----
From: James Thornton [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 21, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Getting CF to parse tags stored in variables


James Thornton wrote:
> 
> James Thornton wrote:
> >
> > What's the best way to store a tag in a variable and get CF to parse it?
> >
> > For example, I want to build several stored proc tags, and store them in
> > a variable until I am reading for them.
> 
> I just discovered the CF5 tag "cfsavecontent" -- would using it be the
> best method for this?

Apparently it won't work for this scenario -- it executes the stored
procedure instead of saving it in the variable. Any ideas on a solution?

 JT
________________________________________
James Thornton, http://jamesthornton.com

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to