| Author: kunal badgujar 08 Jul 2008 | Member Level: Gold | Rating: Points: 4 |
hi.. try following code..
<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>
|
| Author: Nithya 08 Jul 2008 | Member Level: Gold | Rating: Points: 5 |
hi... log file means its a text file... So, If you want to create the text file on the client then I think you'll have to use an ActiveX object e.g.
<html> <head> <script language="javascript"> function WriteToFile() { var fso = new ActiveXObject("Scripting.FileSystemObject"); var s = fso.CreateTextFile("C:\\Test1.txt", true); s.WriteLine('Hello'); s.Close(); } </script> </head> <body onLoad="WriteToFile()">
</body> </html>
|