Hi everybody,
I need to save same data to a .txt file (using javascript).
Please see this example of clicking in an image and get the coordinates (Click Here). The coordinates appear on the bottom of the image. What I need is to save this information (x and y coordinates) to a .txt file.
I read about it and tried some code but i couldn't found any solution. Not even write ou create a .txt file.
I tried this peace of code just to create a file but I have a syntax error on line 6. This is just an example of code available on the internet. I tried a lot of other examples but i couldnt find nothing that creates the .txt file.
And I use both Safari and Internet Explorer.
<html>
<head>
<script language="javascript">
function WriteToFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Test.txt", true);
s.WriteLine('Hello');
s.Close();
}
</script>
</head>
<body onLoad="WriteToFile()">
</body>
</html>
Anyone know how to do this? Or have some idea how to solve it?
Im trying to use javascript but perhaps the solution is php. I dont know.
Thanks for the help.