I have been trying to create my own type of blog style website where you post to a .txt file using javascript.
I have been encountering lots of trouble with this and have only managed to find a tiny part of what I want. Can you please help me!!!
Code:
<html><head>
<script language="javascript">
function Writedata()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var write_id;
write_id = document.getElementById('write_id').value ;
alert('The data has been written to \n' + write_id);
var s = fso.CreateTextFile(write_id, true);
s.WriteLine(document.getElementById('name_id').value);
s.WriteLine(document.getElementById('id_id').value);
s.Close();
}
</script>
</head>
<body>
Date : <input type="text" name="name" value="" id="name_id"><br/>
Address : <input type="text" name="id" value="" id="id_id"><br/>
Write file to : <input type="text" name="write" value="" id="write_id"><br/>
<input type="button" onclick="Writedata()" value="submit">
</body>
</html>
To reiterate the question, Please can you make the Date section add a date on webpage load and have the text from the address append to a file from the 'write file to' input.
Thanks!