• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Save Form data to a File?

I need to create a form which has to be in html or viewable with IE5.

The trouble is I want the form to submit the data into a file an NT_Server rather than an on a web page. I have tried to get this working but i just cant get this to work.

It appears that I can only have a form working on an online web page.

If i cant do this in Fountpage how will i setup a simple text box and submit form on a web page to submit to a file on a server.

Confused
0
albionuk
Asked:
albionuk
  • 11
  • 10
  • 2
  • +1
1 Solution
 
webwomanCommented:
I'm really confused about what you're trying to accomplish.

You can't 'submit the data into a file an NT_Server' -- you can submit the data through a WEB SERVER to save to a file, or write to a database, or send you an email. You can't make a web form that writes to just any kind of file.

And yes, you can only have a form working on an online web page. That's how it works. It will NOT work without being published to a webserver with FP extensions.
0
 
albionukAuthor Commented:
OK. How will i be able to acupmlish my task?

Lets forget about the file being on a location on a server. I just want a form in a htm page that will submit to a file on the computer. I'm certain I have seen it done before but I have no idea how.

Cheers
0
 
albionukAuthor Commented:
Here is waht I need to do:

I need a page with a text box to type into. and a submit button.

The information that is entered into the text box to be put into a file with the username of the person logged in, time and date of the submition.

Or rather than a single file a different file for each submition.

I apologise for any confusion, I know what I need but have a little problem explaining it!


Cheers
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mrgpdpCommented:
You will need to use ASP or another Server side scripting language.

Is the server on NT/windows 2000 or something else?

-Ryan
0
 
albionukAuthor Commented:
The server is nt4.
0
 
mrgpdpCommented:
then you can use ASP to accomplish this!

OK, here it is

On the html form:
<form action="action.asp" method="POST">
  <textarea name="text"></textarea>
</form>

on action.asp:
  <%
    text = request("text")
    filename=server.mappath("writefile.txt")
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set writefile = fs.OpenTextFile(filename, 2, True)
    writefile.writeline(text)
    writefile.Close
    set writefile=nothing
    set fs=nothing
 %>

for more information on the FileSystemObject in ASP: http://www.4guysfromrolla.com/webtech/faq/faqtoc.shtml#FileSystemObject
0
 
hhammashCommented:
Hi,

Check this Link:
http://www.du.edu/uts/training/handouts/front2000/cgifile.htm

Best regards
hhammash
0
 
hhammashCommented:
Hi,

You can simply do that.(I tried it,  it is working)

Create your form in Frontpage.
E.g:
Insert form
Insert textfield
Name it as Name

Insert TextArea
Name it as Description

Save the form as Submit.htm

Create a TXT file using Notepad
Save it on your desktop
Import it to your web folder
Open it after you import it
type the following in the txt file
"Name" (which is the name of the first field)
Press tab
"Description"  (Which is the name of the second field)
Save the txt file as MyForm.txt

Go back to the saved form
Right Click the form
Select Properties
Select Send to (It is the first option)
Click Browse
Go to the file and select it (it is now the MyForm.txt)
You will be asked not to edit setting (accept it) if the form did not ask you after you select the txt file name Click options.

In the File Format select
Text Database using commas as separators

If you want to add user name ..etc go to saved fields and select them from the bottom by checking the check boxes.

Press OK Then Press OK

Now Save the form and test it.

When you submit the form the data will go to the text file which you can very easily convert it to Excel or Database because it is comma seperated.

Best regards
hhammash
0
 
hhammashCommented:
Hi,

Submit the form to a web page:

Create a Web Page and name it as MyFile.htm

Create a form with the fields you want

Go to form properites
Select Send to
Click Browse
Select MyFile.htm
Click Options
Select File Format HTML Definition List
Select Include Field Names
Go to Confirmation page
Select MyFile.htm

Press OK
Press OK
Save your form

Best regards
hhammash
0
 
albionukAuthor Commented:
I have folowed the instructions religiously. But recieve this message while trying to submit an entry to the form:-

FrontPage Run-Time Component Page
You have submitted a form or followed a link to a page that requires a web server and the FrontPage Server Extensions to function properly.

This form or other FrontPage component will work correctly if you publish this web to a web server that has the FrontPage Server Extensions installed.

Click the <Back> arrow to return to the previous page.

Thank you for youur help I think I'm getting closer.
0
 
albionukAuthor Commented:
Please note that I am trying to save the data from the Form into a file on a local file server rather than a web server. eg. \\Nt_Server\Form\FormData.txt

Cheers
0
 
hhammashCommented:
Hi,

Yes this is what I did,  I saved the form to a text file in on the server MyForm.txt

Ok,  but the form will be filled locally right?

Or the form will be filled from the Internet and saved on the server?

Best regards
hhammash
0
 
albionukAuthor Commented:
Sure the form will be filled in localy and saved on the local server. Would you be able to send the html document? I'd be very gratefull.

Cheers

gmerritt@wsgfl.org.uk
0
 
hhammashCommented:
Hi,

Which HTML Document.

Questions:

Are you using FrontPage?
Do you have IIS installed on your NT server?


Where are you planning to put the form for your Network users?

Regards
hhammash



0
 
albionukAuthor Commented:
A working copy of the form if possible. ( guess I would have to change the addresses of the files)

I'll be using FrontPage

I dont have IIS installed. Is it software I need to purchase or is it readily avalible?

I was planning to put the form on for the users.


Cheers. Your help is really welcomed!
0
 
hhammashCommented:
Hi,

You should have a folder in your NT CD called PWS or IIS.

IIS is part of windows CD or Windows NT CD.

Just go to Add Remove programs then select Windows Componenets and select either IIS or PWS then start installing.

Best regards
hhammash
0
 
albionukAuthor Commented:
blinding! so when I have done that, I can setup a folder on the server and get the form running as you have explained before?

I'll have to try it on Monday.

Cheers for all you help.
0
 
hhammashCommented:
Hi,

Of course when you setup IIS or PWS and install FrontPage Extensions which you will find in IIS Admin or PWS Admin,  follow my two posts above and there you go 100% guaranteed.

In case you need anything just let me know.

hhammash
0
 
albionukAuthor Commented:
Thank you very much!
0
 
hhammashCommented:
Hi,

You are most welcome.

Which answer did you accept?

Regards
hhammash
0
 
albionukAuthor Commented:
I'll have to use most of your threads with an overall answer.

but I accepted this one.

Of course when you setup IIS or PWS and install FrontPage Extensions which you will find in IIS Admin or PWS Admin,  follow my two posts above and there you go 100% guaranteed.

Cheers
0
 
hhammashCommented:
Good,  but you did not give me the points.

You have to click Accepted this answer next to my answer in order to award me the points.

Regards
hhammash
0
 
albionukAuthor Commented:
I hope this has given you the points now.
0
 
hhammashCommented:
Hi albionuk,

Yes,  thank you very much.

Let me know what happens.

hhammash
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 11
  • 10
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now