Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

message for glenmac from abhayrao

Status
Not open for further replies.

abhayrao

Technical User
Nov 5, 2002
16
0
0
IN
hey glenmac!
your code you gave me to write to a text file doesn't seem to work .It does not dislay an inputbox.could you make it fine.here's your code:-
<html>
<script>
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Const TristateFalse = 0
Const TristateTrue = -1
Const TristateUseDefault = -2
Dim title
Dim paragraph
Dim afile
Dim ts
Dim fs


title = &quot;Writing to File&quot;

paragraph = inputbox(&quot;enter your text&quot;)


Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)
' open file to write to, create if not there, using ASCII
afile =&quot;D:\feedback.txt&quot;
Set ts = fs.OpenTextFile(afile, 8 , -1)

ts.WriteLine title
ts.WriteBlankLines(1)
ts.WriteLine paragraph
ts.Close</script>
</html>
 
sorry to butt in - change the second line to read

<SCRIPT LANGUAGE=&quot;vbscript&quot;>

I did this and it worked for me

Regards
Steve Friday
 
to further explain that. client side coding (scripting) defaults to javascript so you need to specify the language outside of that if you are going to use something as vbscript.


note: not many users here like the name thing in the question. we're all here to help and basically have no ties to threads. There are hundreds of some of the best programmers in the world (literally) here and we all are more then willing to help. A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top