I want that when the user presses the div, a new file will be created and the line: Testing 1, 2, 3. will be inserted.
I tried the next thing:
<div id="rect0" onclick="CreateFile();" style="height: 85px; width: 85px; background-color:#ff0000; ">Hello</div>
<script>
function CreateFile()
{
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
tf = fso.CreateTextFile("c:\\Log\\logJscript2.txt", true);
tf.WriteLine("Testing 1, 2, 3.") ;
tf.Close();
}
</script>