fengshui1998,you wanted to see my code.Here it is:-
<html>
<script language="VBScript">
function save()
Dim oFS, writefile
Set oFS = CreateObject("Scripting.FileSystemObject"
Set writefile= oFS.OpenTextFile("c:\a.txt",true)
writefile.write(S1.value)
writefile.close
end function
function open()
Dim oFS, readfile
Set oFS = CreateObject("Scripting.FileSystemObject"
Set readfile= oFS.OpenTextFile("c:\a.txt",true)
readfile.ReadAll
readfile.close
end function
</script>
<body>
<textarea rows="20" name="S1"
cols="80"></textarea><br>
<input type="button" id="save"
value="Save" onClick="save()">
<input type="button" id="open"
value="Open" onClick="open()">
</body>
</html>
can you tell what the problem is and how to handle the "bad file mode" error?
<html>
<script language="VBScript">
function save()
Dim oFS, writefile
Set oFS = CreateObject("Scripting.FileSystemObject"
Set writefile= oFS.OpenTextFile("c:\a.txt",true)
writefile.write(S1.value)
writefile.close
end function
function open()
Dim oFS, readfile
Set oFS = CreateObject("Scripting.FileSystemObject"
Set readfile= oFS.OpenTextFile("c:\a.txt",true)
readfile.ReadAll
readfile.close
end function
</script>
<body>
<textarea rows="20" name="S1"
cols="80"></textarea><br>
<input type="button" id="save"
value="Save" onClick="save()">
<input type="button" id="open"
value="Open" onClick="open()">
</body>
</html>
can you tell what the problem is and how to handle the "bad file mode" error?