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

Reply via email to