:: Forum >>

Hi, I tried writing a file using ActiveX...bt its nt working...plz tell d error

Its a form in javascript using ActiveX Objects in which user inputs the data & this data is to be saved in a file that is in C: drive...
but when i submit the page the function is called till alert but the file is not generated...plz tell wht is my error.
The code is below:
<script>

function ss()
{
alert("your data is saving...plz wait")

var create= new ActiveXObject("Scripting.FileSystemObject");

var newFileObject =create.CreateTextFile("C:\log.txt", 8,true,0);

alert("File Saved")

newFileObject.close();
}

</script>


<form>



<h2>Feedback Form</h2>

Name:
<input type="text" name="name">
<br>

OUC:
<input type="text" name="ouc">
<br>

Question/Query:
<textarea rows="10" cols="25" name="ques" id="question">
</textarea>
<br>


<input type="submit" value="submit" onClick="ss()">

</form>

plz help me as soon as possible....
TIA
john
Monday, August 21, 2006

This topic is archived.


Back to support forum

Forum search