Staticfactory
IS-IT--Management
This is the first time I've tried to incorporate vbscript into a webpage (as a GUI of sorts) and I'm wondering why this simple code in the body of the document won't work?
I would imagine this is a simple question, but I'm not sure why it doesn't seem to be doing anything. Is there something about IE security settings that blocks FSO usage?
Code:
<script type="text/vbscript">
const forReading = 1
const forWriting = 2
const forAppending = 8
Dim elem, iUpperBound, arrText(), fRead, fso
iUpperBound = 0
set fso = CreateObject("Scripting.FileSystemObject")
set fRead = fso.OpenTextFile("SomeFile.txt", forReading)
While Not fRead.AtEndOfStream
ReDim Preserve arrText(iUpperBound)
arrText(UBound(arrText)) = tFileRead.ReadLine
iUpperBound = iUpperBound + 1
wend
fRead.close
for each elem in arrText
document.write (elem)
next
set fRead = Nothing
set fso = Nothing
</script>
I would imagine this is a simple question, but I'm not sure why it doesn't seem to be doing anything. Is there something about IE security settings that blocks FSO usage?