469,631 Members | 1,667 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

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 32349
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Marcelo Rizzo | last post: by
5 posts views Thread by John Dewbert | last post: by
2 posts views Thread by Sean S - Perth, WA | last post: by
2 posts views Thread by Luis Esteban Valencia | last post: by
1 post views Thread by G Gerard | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.