1

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

Votes + Comments
coll
<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>
3
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by vmars
0

<script>
Pls, is this different than javascript? How so?
If not javascript, how can I change it to javascript?
Thanks...vmars

0

Here's my attempt to change it to javaScript:
Since there is no EVENT to execute the script, when does it get executed?
It appears to not execute.
I ran it with ie, firefox, googleChrome.
Thanks for your help!...vmars

<Html>
<head>
<script type="text/javascript">
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>
</head>
<Body>
<h3>var fso = new ActiveXObject("Scripting.FileSystemObject");</h3>
</body>
<html>

Edited by mike_2000_17: Fixed formatting

0

I even tried changing the above script:
<script type="text/javascript">
to
<script type="text/vbscript">

and ran it with IE,
But s till nogo.
Help, please.
Thanks...vmars

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.