ssjs create file - I can't do it :(

S

SteMc

Hi, I'm trying to create a text file on an asp page but am having loads
of trouble.

At the minute what happens is this - I have a form with a textarea.
When the form posts, the action is to run an asp page. Inside the asp
page I want to take the text from the textarea and write it to a text
file.
From looking on the net and googling many many times I can only find
the following way to do this;

var file_obj = new File("path/filename");

from here I should be able to do things like write to the file. I'm
stopped however on the above line. When I run the asp page I'm told
that File hasn't been identified. I'm not aure what to do, I'm writing
it exactly as examples show :(

anyone have any ideas?

I've succesfully written a text file using vbscript, but can't get the
for loop to work properly there and as that loop type is needed I can't
use vbscript either at the moment :(

Someone please help, its driving me mad
 
V

VK

SteMc said:
From looking on the net and googling many many times I can only find
the following way to do this;

var file_obj = new File("path/filename");

There is not intrinsic constructor File neither in standard JavaScript
nor in JScript. So what you have found it must be a part of some custom
library.

If you want to create a text file client-side then you cannot do it
within the default security settings (for relaxed security there are
several UA-dependant options)

If you want to create a file server-side using your ASP page then
<microsoft.public.inetserver.asp.general> would be more relevant for
your question.
 
S

SteMc

Yeah, I will be posting a message in that group too, but as ASP
supports multiple languages I'm not confindent of an answer there. I
suspect that I'll be posted back here because my question is javascript
specific. Having looked already I've found that the the text related
questions in that group focus on vbscript.

thanks anyway for your post, its useful to know that the File
constructors isn't available-it'll stop me going round in circles. :)

ta,

Ste
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top