It is a simple one and a more complex one will be here soon
this code has not been tested but it works well on IE 6.0+
Do enjoy and Comment it Please
Smart Mind "SCRIPT to Write Text files"
vmars commented: coll +2
<script>
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("test.htm", true);
//--varibles-- starts.
//--variables--ends.
var bgcolor="red"
s.WriteLine('<html>');
//To enter more than one arguments (i-e simple and a variable or special character we can use the "+" sign )
s.WriteLine('<body bgcolor='+bgcolor+'>');
s.WriteLine('</body>');
s.WriteLine('</html>');
s.Close();
</script>
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.