473,566 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Nov 29 '06 #1
2 1847
VK

SteMc wrote:
>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.publ ic.inetserver.a sp.generalwould be more relevant for
your question.

Nov 29 '06 #2
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

VK wrote:
SteMc wrote:
>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.publ ic.inetserver.a sp.generalwould be more relevant for
your question.
Nov 29 '06 #3

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

Similar topics

4
6760
by: Frank Millman | last post by:
Hi all I need to generate potentially large reports from a database, and I want to offer the option of print preview before actually printing (using wxPython). I figure that the best way to achieve this is to write the report to a temporary file, or more likely to a temporary directory with a separate file for each page. I can use that for...
3
2656
by: Rajesh | last post by:
Hi, I am using iplanet webserver 4.1. I want to call a java class from ssjs file. But I am not getting the result. I have created a java class file and put it in the folder <Server>\Netscape\Server4\bin\https\jar folder. But I am not sure whether it is the right location to put the class file. Also I would like to know how to put the class...
7
8834
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and...
4
4396
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create shortcut to my program/utility (2) Entry in Windows' Start --> Program Menu. Actually in my VB.Net solution I have two projects (1) MYPROGRAM (2)...
5
6752
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would cause. If I could create a large file that could be encrypted, and maybe add files to it by appending them and putting in some kind of delimiter...
8
20337
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1: Start with original thumbnails & two empty sub directories STEP 2: Create smaller versions of the originals for one sub directory STEP 3: Create...
23
7371
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these in an array. The application compiles but aborts without giving me any useful information. What I suspect is happening is infinite recursion....
1
2488
by: kaizhang | last post by:
i installed an IIS on windows 2003 server (with mySQL and php as well). However, i can't get serverside javascript running. Googled for help, nothing useful found. Anyone has experience with SSJS on IIS?
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2083
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 we have to send another system
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.