eBook Scripts
how to collect user input from a form and store it into a file

 
Home Design Tips Scripts Templates/Translations


How to collect user input from a form and store it into a file

Overview

This script demonstrates how to use an HTML form, process it locally and store the data into an external file. The script is not especially useful in itself, but can serve as a starting point for your own efforts.


Requirements
Instructions
  1. Create an HTML page, in your source folder, containing the HTML form code. As we are processing the form locally we need to use METHOD="POST" and set ACTION= to point to an Activ Link, in this example, #!writefile.as to run the writefile.as Activ Script when the form is submitted.

  2. Create an Activ Script, in this example called writefile.as, in your source folder using a text editor like Notepad. This script runs when the user submits the form and saves the data to the file.

    Please note: If using Notepad on a version of Windows prior to Windows XP, when you save in Notepad, be sure to place the file name in quotes on the Save As dialog box, i.e. "setmark.as" otherwise Notepad will add .txt to the end of the name (giving a file name of writefile.as.txt). If using Notepad on Windows XP, this workaround is not necessary.




Notes
  1. This script has been tested with Activ E-Book Compiler versions 4.20, 4.21 and 4.22 (4.22 is the latest version at the time of writing). It is possible that changes might be required for e-books made with subsequent versions.

  2. This script will not work with versions of Activ E-Book Compiler prior to 4.20.


Amazon Integration Powered by Piranha Feed




 

Sites about eBooks

EBookApprentice.com
Learn about eBook publishing

EBookCompiler.com
Software to create your own eBooks

CoverFactory.com
Create eBook Covers with ease

EBookPower.com
Add multimedia to your eBooks

EBookFriends.com
Discuss eBooks

EBookInterviews.com
Read about other eBook authors' experiences

EBookSubmit.com
Learn about eBook marketing

EBookJungle.com
Searchable directory of eBooks



Related Links

Internet Marketing
 Learn Marketing
 Marketing Tactics

Promotion Links
 Email Marketing
 Increase Traffic
 Press Releases
 Search Engines
 Web Position

Web Site Building
 Accept Credit Cards
 Affiliate Programs
 Domain Names
 Setup Internet Store
 Web Design Tutorial
 Web Hosting
 Webmaster Tools

 

 
About/Terms Of Use     Privacy     Site Map

Copyright © 2002-2008, Answers 2000 Limited