CGI help desparately needed

Aug 31, 2004
79
0
66
I have the following cgi code I need to modify:

Code:
open(OUT, ">javascripts/update.txt")

The above deletes everything in the file update.js. I then have more code that fills out update.txt with information from a form.

Now for a contest I'm doing, what I am trying to do is make a new file for each entry in a contest. I need to write a unique file for each file in a contest. The file name will be gotten by javascript,
Code:
<script type="text/javascript">
     file_name=new Date();
     document.write('<input type="hidden" name="'+file_name+'">');
</script>
How do I get my cgi script to write a file with this filename?

Sorry for the nooberific post. I need to get this contest going by tonight.
 

kingtas

Senior member
Aug 26, 2006
421
0
0
<SCRIPT LANGUAGE="JavaScript">
<!--
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newFileObject = fso.CreateTextFile("C:\\new.txt", true);
-->
</SCRIPT>

Substitute the new.text with a form field text & .txt to name the file uniquely.