Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting a template into a hidden field

Status
Not open for further replies.

ScottNeth

Technical User
Mar 11, 2002
44
US
ARG! This is driving me nuts and I've been working on it three days:

<input type=&quot;hidden&quot; name=&quot;doc&quot; value= &quot;<cfinclude template= &quot;../Secure/Req/eSignDocs/#rsLoginVerification.docNumber#/Doc.cfm&quot;>&quot;>

I have a contract that needs to be stored in the hidden value of &quot;doc&quot; - this particular piece of code causes the whole template document to be output again...I've narrowed it down to something in the <> and/or &quot;&quot;. anybody know how to do this?

Scott Neth
Web Designer/Cyberpunk
 
Try using the cffile (action=read), the place the variable of the cffile tag in the <input type=&quot;hidden&quot; value=&quot;cffilevariable&quot;>.

Remember that your CFServer parses all coldfusion code then sends the remaining html to the webserver. So when CFServer sees your cfinclude tag, it will open up that document - CF doesn't know that you want to &quot;hide&quot; the doc in the <input..> tag.
 
It didn't quite work.
Here's what I tried:

<cffile action = &quot;write&quot;
file = &quot;E:\DOCS_OUTSIDE\EXTERNAL_CHANNELS\secure\#form.ehyperlink#.txt&quot;
output = &quot; <cfinclude template=&quot; ../Secure/Req/eSignDocs/#rsLoginVerification.docNumber#/Doc.cfm&quot;>&quot;>
<cffile action = &quot;read&quot;
file=&quot;E:\DOCS_OUTSIDE\EXTERNAL_CHANNELS\secure\#form.ehyperlink#.txt&quot;
variable = &quot;dog&quot;>
<input type=&quot;hidden&quot; name=&quot;doc&quot; value=&quot;<cfoutput>#dog#</cfoutput>&quot;>

It would be wonderful if it would take the dynamic content of the page and create a static file of it like we're tyring to do here...I just can't get it to find the template in the output portion...it puts into the file .

Scott Neth
Web Designer/Cyberpunk
 
&quot;It would be wonderful if it would take the dynamic content of the page and create a static file of it like we're tyring to do here&quot;

Use CFCONTENT to create a static file from dynamicly created data. I use it to save invoices for example.

 
Leave out the &quot; &quot; in the include file.

<input type=&quot;text&quot; value=&quot;<cfinclude template=bob.cfm>&quot;>

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
replace the double quotes around template=&quot;&quot; with template=''
<input type=&quot;hidden&quot; name=&quot;doc&quot; value= &quot;<cfinclude template='../Secure/Req/eSignDocs/#rsLoginVerification.docNumber#/Doc.cfm'>&quot;>

This works for any nesting of double quotes.

Aaron

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top