473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

FileSystemObject

I have inherited form that requires me to use the FilesystemObject to
write to a file. I have to use Javascript to instantiate and use the
object. I think that I am having a problem as far as getting the
javascript to work server side. I am able to create a file and write
to it locally but when trying to work it on the server, I get
Unspecified Error. I thought that possibly using <script
language="javascript" runat="server"> would take care of that. But it
says objected expected when I have thte runat=server in there. It
doesn't even recognize the function. Any ideas on how i can run the
following code onSubmit using Javascript? I had it done in vbscript
but the client insists that it be done using Javascript. Please
help!!!!!

Yemi

function getEmailList()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newfile = fso.OpenTextFile("d:/inetpub/www.lottery.state.az.us/database/textfiles/textfile.txt",
8,true);
newfile.WriteLine("It works.");
newfile.Close();
}
Jul 20 '05 #1
2 32673
Does the server have any antivirus software installed? Norton is famous for
causing problems with this kind of script: if you have it then you might
look into disbling the "script blocking" feature.

tim

"John Cummings" <su*******@hotmail.com> wrote in message
news:85*************************@posting.google.co m...
I have inherited form that requires me to use the FilesystemObject to
write to a file. I have to use Javascript to instantiate and use the
object. I think that I am having a problem as far as getting the
javascript to work server side. I am able to create a file and write
to it locally but when trying to work it on the server, I get
Unspecified Error. I thought that possibly using <script
language="javascript" runat="server"> would take care of that. But it
says objected expected when I have thte runat=server in there. It
doesn't even recognize the function. Any ideas on how i can run the
following code onSubmit using Javascript? I had it done in vbscript
but the client insists that it be done using Javascript. Please
help!!!!!

Yemi

function getEmailList()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newfile = fso.OpenTextFile("d:/inetpub/www.lottery.state.az.us/database/textfiles/text
file.txt", 8,true);
newfile.WriteLine("It works.");
newfile.Close();
}

Jul 20 '05 #2
"Tim Williams" <sa************@THISpacbell.net> wrote in message news:<hf*****************@newssvr16.news.prodigy.c om>...
Does the server have any antivirus software installed? Norton is famous for
causing problems with this kind of script: if you have it then you might
look into disbling the "script blocking" feature.

tim

"John Cummings" <su*******@hotmail.com> wrote in message
news:85*************************@posting.google.co m...
I have inherited form that requires me to use the FilesystemObject to
write to a file. I have to use Javascript to instantiate and use the
object. I think that I am having a problem as far as getting the
javascript to work server side. I am able to create a file and write
to it locally but when trying to work it on the server, I get
Unspecified Error. I thought that possibly using <script
language="javascript" runat="server"> would take care of that. But it
says objected expected when I have thte runat=server in there. It
doesn't even recognize the function. Any ideas on how i can run the
following code onSubmit using Javascript? I had it done in vbscript
but the client insists that it be done using Javascript. Please
help!!!!!

Yemi

function getEmailList()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newfile =

fso.OpenTextFile("d:/inetpub/www.lottery.state.az.us/database/textfiles/text
file.txt",
8,true);
newfile.WriteLine("It works.");
newfile.Close();
}

I see that the client does not insist of JavaScript, but instead
favors using anything but VB trash. The answers to this are well
documented. Try the HTTP protocol this month.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcelo Rizzo | last post by:
I am trying to get the name of a file with a specific extension (tmw) from several different directories. The problem I am having is that the program stops working on the second pass with an run...
5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
3
by: Wayfarer | last post by:
Hi, I've got a freebie hosting mirror of my production personal website (sounds kinda grandiose, doesn't it?) at http://journeys.webhostme.com/. At the production website I was using...
3
by: Steve | last post by:
Hi all, FileSystemObject question... I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a...
2
by: Sean S - Perth, WA | last post by:
Hi all, If I create a FileSystemObject Object is it appropriate to reuse it to perform operations on different files/folders? Or should I create a new FileSystemObject Object for each file and...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
2
by: Luis Esteban Valencia | last post by:
I'm trying to write a little VB.NET script in an ASP.NET web page that will create folders, move files, etc... pretty much everything you can expect to do using the FileSystemObject library. Is...
1
by: G Gerard | last post by:
Hello I am using the FileSystemObject to copy files on a computer Dim MyObject as Object
3
by: nagmvs | last post by:
hello I have a problem with FileSystemObject in Vb Suppose i want to declare as Dim fs As New FileSystemObject, when i type New After that i can't see FileSystemObject in derived DropDownList. ...
12
lee123
by: lee123 | last post by:
why is this so hard to do. i have alot of books that have exaples of how to do these things but when i try the exaples they never work i have a previous post on "copying files" some of the other guys...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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...

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.