writing out to a text file with javascript

R

Ron Smith

What I want to do is create a HTML form that allows the user to enter data
into about 10 fields, and then based on the entered data, writes out data
strings to a text file. I am attempting to create a form for entering
simple rectangle CAD data via a HTML form, which will be written to a text
file, and then imported into a CAD program.

The form would contain prompt boxes for things like length, width, radius
size, step/repeat, etc. When the user hits the "SUBMIT" button, the data
strings would be written out to the filename the user specified. Below is
an example of data strings to be ouputted. Variables are &L, &W, &R,
&STEPX, &STEPY, &XN, &YN.

FRO 0 0 BY &L 0 ATT 1 POI 2
BY 0 &W ATT 1 POI 2
BY -&L,0 ATT 1 POI 2
TO 0 0 POI 2
JOI EXT 1 2 BLE &R
JOI EXT 2 3 BLE &R
JOI EXT 3 4 BLE &R
JOI EXT 4 1 BLE &R
TRY;SEC LAYOUT;REC;LAYOUT;YRT
SUB A POS 0 0 ATT 0;FILE A INT
MER A TO A
TRY;COP 1 BY &STEPX 0 TIM &XN-1;REC;YRT
TRY;COP .. BY 0 &STEPY TIM &YN-1;REC;YRT
 
R

Richard Cornford

Ron said:
What I want to do is create a HTML form that allows the
user to enter data into about 10 fields, and then
based on the entered data, writes out data strings to a
text file. I am attempting to create a form for entering
simple rectangle CAD data via a HTML form, which will be
written to a text file, and then imported into a CAD program.
Any help on a source of example code would be appreciated.

The answer depends on context information missing from your post. In a
web page loaded from a remote server over HTTP normal security
provisions prevent any client-side script form accessing the client's
local file system. Other contexts introduce possibilities, for example,
a WSH running locally on a Windows box could employ Internet explorer to
provide an interface form defined as HTML and manipulate entered data,
saving it to the local file system.

Richard.
 
R

Ron Smith

Richard Cornford said:
The answer depends on context information missing from your post. In a
web page loaded from a remote server over HTTP normal security
provisions prevent any client-side script form accessing the client's
local file system. Other contexts introduce possibilities, for example,
a WSH running locally on a Windows box could employ Internet explorer to
provide an interface form defined as HTML and manipulate entered data,
saving it to the local file system.

Richard.
In the beginning, it would be soley running on an intranet within our
company. I am not sure if this is what you are referring to. I am also
unaware of what WSH is, but will do a search for it.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top