faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 28 people (36%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Is there a similar function to OpenTextStream() that allows me to read from, e.g. http://myserver.com/readme.txt in a server side ASP script?

May 17th, 2001 05:38
Colin Fraser, Kelvin Wong,


No. This is why JavaScript is called "client-side". But you can use 
something like :
<%
Set myFileSystem=Server.CreateObject("Scripting FileSystemObject")
Set 
myTextStream=myFileSystem.OpenTextFile("c:\path\to\files\readme.txt",1)
Response.Write(myTextStream.ReadAll)
Response.Write("<br>")
%>
But this is getting a little off topic though.