VBScript error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scripting
    New Member
    • Apr 2008
    • 4

    VBScript error

    Hi

    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.

    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>
  • Scripting
    New Member
    • Apr 2008
    • 4

    #2
    Hi Gurus,

    Can some one help me on this please...

    Comment

    • jg007
      Contributor
      • Mar 2008
      • 283

      #3
      Originally posted by Scripting
      Hi Gurus,

      Can some one help me on this please...
      what actually happens when you run the script from the shared drive?, also how are you mapped / accessing the shared drive?

      Comment

      Working...