Hello I'm having trouble writing to a text file with javascript, i've tried writing to a local text file on my own PC, and I've also tried writing to a local file on my own server, (which I have all permissions to do so...)
I'd really like to write to a file that resides on my own web server.
Here is my code:
Code:
<head>
<SCRIPT LANGUAGE="JavaScript">
function WriteToFile() {
set fso = CreateObject("Scripting.FileSystemObject");
set s = fso.CreateTextFile("C:\test.txt", True);
s.writeline("HI");
s.writeline("Bye");
s.writeline("-----------------------------");
s.Close();
}
</SCRIPT>
</head>
<body>
<form onSubmit="WriteToFile()">
<input type="submit" value="Run the WriteToFile Function!">
</form>
</body>
quite frankly it just doesn't work, you know what I want to do, I gave you my attempt, please help me do it
thank you