Forget the whole session var thing. just write the #form.textvar# to a file .....
if you do this
<cfset session.writeoutput = #session.writeoutput# & #form.textvar#>
you'll get the full original text followed by the full edited text, which is probably
not what you want.
This on the other hand should do the trick
Action-write Page:
<cffile action="WRITE" file="C:\output.txt" output="#session.writeoutput#"
addnewline="Yes">
HTH
Allan
---------- Original Message ----------------------------------
From: "Adkins, Randy" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Tue, 12 Jun 2001 09:36:31 -0400
>reason is you need to pass the TEXTAREA information
>as a form element. You are only telling it to write
>the SESSION information. You are not saying anything
>regarding the NEW Information.
>
>So your first page:
>
><form action="action-write.cfm" method=post>
><cffile action="READ"
>file="#URLDecode(application.dirpath)##URLDecode(datafile)#"
>variable="textvar">
><textarea cols="70" rows="25" name="textvar" id="textvar" wrap="off">
><cfoutput>#HTMLEditFormat(textvar)#</cfoutput>
><cfset session.writeoutput = #HTMLEditFormat(textvar)#>
></textarea>
><input type=submit value="[SAVE]">
>
>
>
>Action-write Page:
><cfset session.writeoutput = #session.writeoutput# & #form.textvar#>
><cffile action="WRITE" file="C:\output.txt" output="#session.writeoutput#"
>addnewline="Yes">
>
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 12, 2001 9:26 AM
>To: CF-Talk
>Subject: Re: <CFFILE & <TEXTAREA>
>
>
>
>
>Hi,
>
>I'm having a problem trying to save any changes that I make to the file
>once it's opened in the <textarea> box.
>
>The file gets written out but not any additions?
>
>
><cffile action="READ"
>file="#URLDecode(application.dirpath)##URLDecode(datafile)#"
>variable="textvar">
><textarea cols="70" rows="25" name="textvar" id="textvar" wrap="off">
><cfoutput>#HTMLEditFormat(textvar)#</cfoutput>
><cfset session.writeoutput = #HTMLEditFormat(textvar)#>
></textarea>
>
>
> <a href="action-write.cfm" class="midnavlinks">[SAVE]
>
>
>action-write.cfm file
>--------------------------
>
>
>
><cffile action="WRITE" file="C:\output.txt" output="#session.writeoutput#"
>addnewline="Yes">
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists