Text Box Contents

Results 1 to 2 of 2

Thread: Text Box Contents

  1. #1
    Kayla Guest

    Default Text Box Contents

    I have the following ASP code:<BR><BR>&#060;%<BR>Set objFs = Server.CreateObject("Scripting.FileSystemObject")< BR>sFileName = objFs.BuildPath(Server.MapPath("/_private/"), "testfile.txt")<BR>Set final = objFs.CreateTextFile(sFileName, True)<BR>final.Write(strSymptoms)<BR>final.close<B R>%&#062;<BR><BR>I am trying to send the contents of a textbox labeled strSymptoms to a text file that will be saved in the "_private&#039 subdirectory on my web server. The text file is created, but it remains blank. Please help!<BR><BR><BR>

  2. #2
    peterjl@austec.net.au Guest

    Default RE: Text Box Contents

    I assume that the variable strSymptoms has been correctly set somewhere else in your script:<BR><BR>eg: <BR>&nbsp;&nbsp;&nbsp;&nbsp;strSymptoms = request.form("strSymptoms")<BR>or<BR>&nbsp;&nbsp;& nbsp;&nbsp;strSymptoms = request.QueryString("strSymptoms")<BR><BR>If your script is VBScript, then the line that reads:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;final.Write( strSymptoms)<BR><BR>should in fact be :<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;final.Write strSymptoms<BR>(i.e. no brackets).<BR><BR>Also it should be :<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;final.Write strSymptoms & vbCrLf <BR><BR>if you want each entry to appear on a new line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts