473,503 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBScript error

4 New Member
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="vbscript" 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("scripting.filesystemobject")
set Fldr =FSO. GetFolder("./")
srcPath = Fldr.Path & "\Tel"
mypath = srcpath


strNewFile = srcPath & "\Location.txt"
msgbox strNewFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strNewFile, ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
Set objOption = Document.createElement("OPTION")
objOption.Text = strLine
objOption.Value = strLine
frm1.Location.Add(objOption)
i=i+1
Loop
objFile.Close
End Sub

</script>
</head>
<body>
<form name="frm1">
<Center>
<body>
<SELECT NAME="Location">
</form>

</body>
</html>
Apr 1 '08 #1
2 1100
Scripting
4 New Member
Hi Gurus,

Can some one help me on this please...
Apr 1 '08 #2
jg007
283 Contributor
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?
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6811
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't...
29
5985
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
16
9312
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
1
396
by: Ana Rita | last post by:
Hello to all. I'm trying to do call a vbscript sub in one page aspx. My vbscript sub is in a file with the extension (vbs) and it looks like this: Sub Mens (strmens) Msgbox strmens
2
7887
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed...
4
12653
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
3
7008
by: Joe Caverly | last post by:
Hi, I'm using Visual C++ 32-bit Professional Edition 5.0 Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying to transform this VB Code; Dim sc As Object Dim code As String...
2
2859
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to...
0
1872
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng...
1
3428
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.