Yes I'm new to this. X-) Thank you if you can see what I'm missing.
Want to save a one field form info to a file for later retrieval. Writing to the file is not a problem at this point, and the previous info is overwritten which is perfect for my purpose.
The action seems to take place whether or not the code is in a function, but I want to use the value to display in html (via alert, document write, etc.).
Currently getting 'undefined' with my document.write attempt (and I have looked at a lot of 'undefined' threads that I wasn't sure applied to my mistake).
<script language="JavaScript">
<!-- Hide Me
function test1(){
stuff = "text I want to save to a file then call forth as a variable each time the page is opened. (just seeing if the text would react the same as a vaiable in text.Write as opposed to putting it there directly."
var TristateFalse = 0;
var ForWriting = 2;
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject"
myActiveXObject.CreateTextFile("c:\\cisco\\project\\test.txt"
file = myActiveXObject.GetFile("c:\\cisco\\project\\test.txt"
test = file.OpenAsTextStream(ForWriting, TristateFalse);
test.Write(stuff);
test.Close();
}
// -->
</script>
<script language="JavaScript">
<!-- Hide Me
document.write("is this it?" + test1()); //this is where the 'undefined' occurs (the 'test1()' part (I just got burnt out on this tonite and thought I'd ask))
// -->
</script>
Thanks again if you can assist.
Chuck "Uh, honey, a P5 with a 20" monitor is perfect for email"
Want to save a one field form info to a file for later retrieval. Writing to the file is not a problem at this point, and the previous info is overwritten which is perfect for my purpose.
The action seems to take place whether or not the code is in a function, but I want to use the value to display in html (via alert, document write, etc.).
Currently getting 'undefined' with my document.write attempt (and I have looked at a lot of 'undefined' threads that I wasn't sure applied to my mistake).
<script language="JavaScript">
<!-- Hide Me
function test1(){
stuff = "text I want to save to a file then call forth as a variable each time the page is opened. (just seeing if the text would react the same as a vaiable in text.Write as opposed to putting it there directly."
var TristateFalse = 0;
var ForWriting = 2;
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject"
myActiveXObject.CreateTextFile("c:\\cisco\\project\\test.txt"
file = myActiveXObject.GetFile("c:\\cisco\\project\\test.txt"
test = file.OpenAsTextStream(ForWriting, TristateFalse);
test.Write(stuff);
test.Close();
}
// -->
</script>
<script language="JavaScript">
<!-- Hide Me
document.write("is this it?" + test1()); //this is where the 'undefined' occurs (the 'test1()' part (I just got burnt out on this tonite and thought I'd ask))
// -->
</script>
Thanks again if you can assist.
Chuck "Uh, honey, a P5 with a 20" monitor is perfect for email"