Hi
I am not sure this is right place for this question
I am new to vbscripting... Just write this very simple vbscript file Its working perfectly if run from my local PC. If I run this same file from shared drive the script is not executing. Please some one can help to fix this issue.
It would be hightly appriciated if someone can help me asap..please
Thanks in Advance
Code
=====
<html>
<head>
<script language="vbscr ipt" type="text/vbscript">
dim str
dim opt
dim srcPath, mypath
<!-- Procedure to load Group List -->
Sub Window_Onload
ForReading = 1
i=0
set FSO = createObject("s cripting.filesy stemobject")
set Fldr =FSO. GetFolder("./")
srcPath = Fldr.Path & "\Tel"
mypath = srcpath
strNewFile = srcPath & "\Location. txt"
msgbox strNewFile
Set objFSO = CreateObject("S cripting.FileSy stemObject")
Set objFile = objFSO.OpenText File(strNewFile , ForReading)
Do Until objFile.AtEndOf Stream
strLine = objFile.ReadLin e
Set objOption = Document.create Element("OPTION ")
objOption.Text = strLine
objOption.Value = strLine
frm1.Location.A dd(objOption)
i=i+1
Loop
objFile.Close
End Sub
</script>
</head>
<body>
<form name="frm1">
<Center>
<body>
<SELECT NAME="Location" >
</form>
</body>
</html>
I am not sure this is right place for this question
I am new to vbscripting... Just write this very simple vbscript file Its working perfectly if run from my local PC. If I run this same file from shared drive the script is not executing. Please some one can help to fix this issue.
It would be hightly appriciated if someone can help me asap..please
Thanks in Advance
Code
=====
<html>
<head>
<script language="vbscr ipt" type="text/vbscript">
dim str
dim opt
dim srcPath, mypath
<!-- Procedure to load Group List -->
Sub Window_Onload
ForReading = 1
i=0
set FSO = createObject("s cripting.filesy stemobject")
set Fldr =FSO. GetFolder("./")
srcPath = Fldr.Path & "\Tel"
mypath = srcpath
strNewFile = srcPath & "\Location. txt"
msgbox strNewFile
Set objFSO = CreateObject("S cripting.FileSy stemObject")
Set objFile = objFSO.OpenText File(strNewFile , ForReading)
Do Until objFile.AtEndOf Stream
strLine = objFile.ReadLin e
Set objOption = Document.create Element("OPTION ")
objOption.Text = strLine
objOption.Value = strLine
frm1.Location.A dd(objOption)
i=i+1
Loop
objFile.Close
End Sub
</script>
</head>
<body>
<form name="frm1">
<Center>
<body>
<SELECT NAME="Location" >
</form>
</body>
</html>
Comment