Please help: Problem submitting form 
Author Message
 Please help: Problem submitting form

Hi all,
I have an HTML questionnaire form, but don't know how to direct the data
entered into the fields to a VBScript (which saves the data to a text file)
inside my HTML document. As soon as the user pressed the SUBMIT button, the
page specified in the "action=" part (of the FORM definition) opens,
bypassing my VBScript SUB. What can I do so that the submitted data will
first be saved, before the next HTML page is opened?
I know I can have the form-data sent to my email address, but rather wish to
save it to a file on my website, from within the HTML page.
Any help will be appreciated.
Thanks a lot,
Chris.


Thu, 18 Apr 2002 02:00:00 GMT  
 Please help: Problem submitting form
<input type=button name="submit" value="Submit" onclick="submit code">
Reset can stay the same. Leave action and method out.

BTBB


Quote:
> Hi all,
> I have an HTML questionnaire form, but don't know how to direct the data
> entered into the fields to a VBScript (which saves the data to a text
file)
> inside my HTML document. As soon as the user pressed the SUBMIT button,
the
> page specified in the "action=" part (of the FORM definition) opens,
> bypassing my VBScript SUB. What can I do so that the submitted data will
> first be saved, before the next HTML page is opened?
> I know I can have the form-data sent to my email address, but rather wish
to
> save it to a file on my website, from within the HTML page.
> Any help will be appreciated.
> Thanks a lot,
> Chris.



Thu, 18 Apr 2002 02:00:00 GMT  
 Please help: Problem submitting form
The question is a bit confusing. I don't understand "(which saves the data
to a text file)  inside my HTML document". I assume what you want to do is
save the data to a text file and then open a new HTML document. This needs
to be done via server side processing (CGI or ASP etc..) I assume since you
are using VBScript you are on an NT Server which probably has ASP. If that
is the case make sure the extension on your action document is "asp" and use
something like the following on the page:


<% Response.Expires = 0 %>
<%
'you need to retrieve the form data
theFieldData = Request.Form("theFieldName")
'create a file system object
Set filesystemobject = CreateObject("Scripting.FileSystemObject")
'create a file object
Set textfileobject = filesystemobject
.CreateTextFile("theFullPath/FileName.txt", 8, true)
'write to the file
textfileobject .Write(theFieldData )
'close the file object
textfileobject .Close
'redirect tot where you want to go
response.redirect("whereyouwant togo.htm")
%>

If you are on a UNIX box I'm sure someone can provide you some PERL code to
do the same thing if this is what you need.

--
Tim Brown
Megazine Internet Productions


Quote:
> Hi all,
> I have an HTML questionnaire form, but don't know how to direct the data
> entered into the fields to a VBScript (which saves the data to a text
file)
> inside my HTML document. As soon as the user pressed the SUBMIT button,
the
> page specified in the "action=" part (of the FORM definition) opens,
> bypassing my VBScript SUB. What can I do so that the submitted data will
> first be saved, before the next HTML page is opened?
> I know I can have the form-data sent to my email address, but rather wish
to
> save it to a file on my website, from within the HTML page.
> Any help will be appreciated.
> Thanks a lot,
> Chris.



Mon, 06 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Please help: Problem submitting form

2. Please help: Submitting forms from the WebBrowser contorl

3. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

4. Outlook 200 Form problem - urgent - Please help!!!

5. PLEASE HELP PLEASE HELP PLEASE HELP

6. Formatting Submitted Text HELP PLEASE URGENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

7. Submit Help Please

8. Form submitting problem

9. problem submitting form from a function

10. submit form in child window to parent - IE4 problem

11. Problems with Form.Submit in validation routine

12. div: problem with innerHTML after beeing submitted with a form

 

 
Powered by phpBB® Forum Software