Does anyone have any idea how to save information as text file in an active browser (IE and Netscape), which may be returned from cgi execution? Is there any API I can use?
Printable View
Does anyone have any idea how to save information as text file in an active browser (IE and Netscape), which may be returned from cgi execution? Is there any API I can use?
Here is a basic Page for a feedback for you can make what u want of the form. BUt this is how you save to a text file and send to an email
<form action="--WEBBOT-SELF--" method="POST">
<!--webbot bot="SaveResults" U-File="_private/feedback.txt"
S-Format="TEXT/TSV" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
S-Email-Format="TEXT/PRE" S-Email-Address="[email protected]"
#--------------------------------------------------------
# THEN the form itself
#--------------------------------------------------------
B-Email-Label-Fields="TRUE" S-Date-Format="%d %b %Y" S-Time-Format="%H:%M:%S"
S-Builtin-Fields="REMOTE_NAME REMOTE_USER HTTP_USER_AGENT Date Time" -->
<p><strong>What kind of comment would you like to send?</strong></p>
<dl>
<dd><input type="radio" name="MessageType" value="Complaint">Complaint <input type="radio" name="MessageType" value="Problem">Problem
<input type="radio" checked name="MessageType" value="Suggestion">Suggestion
<input type="radio" name="MessageType" value="Praise">Praise</dd>
</dl>
<p><strong>What about us do you want to comment on?</strong></p>
<dl>
<dd><select name="Subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Store</option>
<option>Employee</option>
<option>(Other)</option>
</select> Other: <input type="text" size="26" maxlength="256" name="SubjectOther"></dd>
</dl>
<p><strong>Enter your comments in the space provided below:</strong></p>
<dl>
<dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
</dl>
<p><strong>Tell us how to get in touch with you:</strong></p>
<dl>
<dd>
<table>
<tr>
<td>Name
<td><input type="text" size="35" maxlength="256" name="Username">
</tr>
<tr>
<td>E-mail
<td><input type="text" size="35" maxlength="256" name="UserEmail">
</tr>
<tr>
<td>Tel
<td><input type="text" size="35" maxlength="256" name="UserTel">
</tr>
<tr>
<td>FAX
<td><input type="text" size="35" maxlength="256" name="UserFAX">
</tr>
</table>
</dd>
</dl>
<dl>
<dd><input type="checkbox" name="ContactRequested" value="ContactRequested">
Please contact me as soon as possible regarding this matter.</dd>
</dl>
<p><input type="submit" value="Submit Comments"> <input type="reset" value="Clear Form"></p>
</form>
I hope this helps
This works for IE I dont know about netscape the engine I used was FrontPage 2000
Quote:
Originally posted by campbell
Here is a basic Page for a feedback for you can make what u want of the form. BUt this is how you save to a text file and send to an email
<form action="--WEBBOT-SELF--" method="POST">
<!--webbot bot="SaveResults" U-File="_private/feedback.txt"
S-Format="TEXT/TSV" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
S-Email-Format="TEXT/PRE" S-Email-Address="[email protected]"
#--------------------------------------------------------
# THEN the form itself
#--------------------------------------------------------
B-Email-Label-Fields="TRUE" S-Date-Format="%d %b %Y" S-Time-Format="%H:%M:%S"
S-Builtin-Fields="REMOTE_NAME REMOTE_USER HTTP_USER_AGENT Date Time" -->
<p><strong>What kind of comment would you like to send?</strong></p>
<dl>
<dd><input type="radio" name="MessageType" value="Complaint">Complaint <input type="radio" name="MessageType" value="Problem">Problem
<input type="radio" checked name="MessageType" value="Suggestion">Suggestion
<input type="radio" name="MessageType" value="Praise">Praise</dd>
</dl>
<p><strong>What about us do you want to comment on?</strong></p>
<dl>
<dd><select name="Subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Store</option>
<option>Employee</option>
<option>(Other)</option>
</select> Other: <input type="text" size="26" maxlength="256" name="SubjectOther"></dd>
</dl>
<p><strong>Enter your comments in the space provided below:</strong></p>
<dl>
<dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
</dl>
<p><strong>Tell us how to get in touch with you:</strong></p>
<dl>
<dd>
<table>
<tr>
<td>Name
<td><input type="text" size="35" maxlength="256" name="Username">
</tr>
<tr>
<td>E-mail
<td><input type="text" size="35" maxlength="256" name="UserEmail">
</tr>
<tr>
<td>Tel
<td><input type="text" size="35" maxlength="256" name="UserTel">
</tr>
<tr>
<td>FAX
<td><input type="text" size="35" maxlength="256" name="UserFAX">
</tr>
</table>
</dd>
</dl>
<dl>
<dd><input type="checkbox" name="ContactRequested" value="ContactRequested">
Please contact me as soon as possible regarding this matter.</dd>
</dl>
<p><input type="submit" value="Submit Comments"> <input type="reset" value="Clear Form"></p>
</form>
I hope this helps