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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a log file

Status
Not open for further replies.

Fingerprint

Programmer
Oct 21, 2002
35
GB
I've written a form application in HTML and Javascript that runs from a floppy disk. It all works fine, and the input from the form saves in csv files onto the disk.
Now I have to get all the information from the csv files and display it on one screen.
I've written the databinding part that does that, and it is fine as long as you specify all the file names, but I want to pick up all the file names automatically.
I can't browse the directory they're in to find them, so I want to write all the filenames it uses (they're generated by adding up the date, hour and minute) to a file, as they are used.
This is my problem. I can't get data to append to the end of a file with information already in it and wondered if anybody had any tips.

Code:
var now = new Date();
   var saveFile = now.getDate() + now.getHours() + now.getMinutes();
   mywin = window.open("about:blank","mywin","width=100,height=100");
   mywin.document.open();
   for (var i=0;i<fieldArray.length; i++)
     {
	 mywin.document.write(&quot;&quot;+fieldArray[i]+&quot;,&quot;);
	 }   
   mywin.document.execCommand(&quot;saveAs&quot;,true,&quot;&quot;+saveFile+&quot;.csv&quot;);
   mywin.document.close();
   mywin.close();

That is the save routine, and I want to write the saveFile variable into a list with all the others, so I can access it again during databinding.

Thanks for any help

- fingerprint
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top