The functions below read a file on the server and create a document on the
fly.
Can someone tell me if their is a way to open a new window via asp and
output the results of these functions to the page in that window.
Thanx heaps.
Sub createPage(template,st)
Set file = Server.CreateObject("Scripting.FileSystemObject")
If file.FileExists(template) Then
Set txt = file.OpenTextFile(template,1)
startfile = txt.ReadAll()
pos = InStr(LCase(startfile), "<content>")
startfile = Left(startfile, pos - 1)
txt.Close
Set txt2 = file.OpenTextFile(template,1)
txt2.Skip(pos + Len(st)- 1)
endfile = txt2.ReadAll()
Response.Write(startfile)
displayContent()
Response.Write(endfile)
Else
msg = "The specified file was not found !"
End If
Set file = Nothing
readFile = msg
End Sub
Private Sub displayContent()
Server.Execute ("page_content.asp")
End Sub