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!

save as html

Status
Not open for further replies.

FALCONSEYE

Programmer
Jul 30, 2004
1,158
US
i am a little bit confused on creating a button that will save the page.cfm as an html document to the user's disk? any help?
 
try this:

<cfsavecontent variable="HTML">
<cfinclude template="myfile.cfm">
</cfsavecontent>

<cffile action="WRITE" file="c:\test.html" output="#HTML#">

Joel
 
close,

but that saves it to the severs disk


<cfsavecontent variable="savetohtml">

<cfset x="this is a cf variable">

<cfoutput>#x#</cfoutput>

</cfsavecontent>

<cffile action="WRITE" file="c:\serverfolder\filename.html" output="#savetohtml#">

<cfcontent type="text/html" file="c:\serverfolder\filename.html">


 
nice, i actually ended up doing it with javascript
thanks tho...
 
oh this a little different. mine is as if you go FILE -> SAVE AS ... -> and type something.html

it seems like yours save a variable instead
 
Yeah, I thought you wanted to create a file for the user to download.

I do this with several web sites to make html copies of all my invoices, so I don't have to rely on the db or cf logic to display a previously created invoice.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top