Article ID: 183631
Article Last Modified on 1/9/2003
Private Function Button1_onclick() As Boolean
Dim f As Integer ' File Handle
Dim txt As String ' Holds text of file for
' processing
Dim strLoc As Long ' Holds current location for
' INSTR
f = FreeFile
If Len(Dir$(TextField1.Value)) > 0 Then
Open TextField1.Value For Input As #f
txt = Input$(LOF(f), f)
Close #f
else
test.innerHTML = test.innerHTML & "<BR><BR>File Not Found."
Exit Function
End If
' Convert CR/LF to HTML line break (<BR>) tags.
strLoc = InStr(txt, vbCrLf)
Do While strLoc <> 0
txt = Mid$(txt, 1, (strLoc - 1)) & "<BR>" _
& Mid$(txt, strLoc + 2)
strLoc = InStr(strLoc + 1, txt, vbCrLf)
Loop
' Add Contents of Text file to end of DHTML page.
test.innerHTML = test.innerHTML & "<BR><BR>" & txt
End Function
Additional query words: web internet ie explorer kbdsi kbDSupport kbVBp kbVBp600 kbHTML kbDHTML
Keywords: kbinfo KB183631