I am working on a project that a user can enter data. But, I want them also to be able to update data, when they need to and save the updated information.
The problem is I am not sure how to do this and I am wondering if e-books can handle this? Any suggestions? I am ready to start putting it together but I am stuck. HELP!
This isn't something I've done in an ebook, but have in other forms.
Basically, what you are after is a database of sorts. Since you'll unlikely have an actual database to work from you are left with only two choices. First, you can use a text file to store the data. Second, you can use a cookie to store the data. If you are saving a very limited amount of information the cookie is something that might work.
In most cases the text file is more likely the way go. If you Google: tutorial javascript "text file" you're going to find a few sites that have the information you are seeking.
I am new to ebooks and very new to scripts. I have written and ebook that I would like to personalize so that the reader is able to see their name as they read through the message. I have been reading and experimenting with the suggestions and help files on the subject of 'forms' and 'Active Scripts' and find myself in way over my head. I simply want to have my custormer start off by typing their name and when they hit 'submit' they are in the book with their personal name all through it. I have thought about looking for a professional to help me with this because I'm not sure I have the time, energy, or brain power to go through the learning curve. Any suggestions would be appreciated.
Sorry for not getting this answer to you sooner. This is relatively seay to do in a scripting language called JavaScript. Any beginning text (I personally like JavaScript A Beginners Guide by John Pollock published by Osborne/McGraw Hill) will show you how to use a form to capture information, assign it to a variable, then write it to the screen when you want to do so.
Although Jeff's idea about using JavaScript to personalize an eBook will work during a session, as soon as you close the program the information is lost. I think what you're looking for is something a little more lasting.
Activ E-Book is perfect for this kind of problem. It's built in Activ Script can be used for reading/writing text files. Using this ability you can capture a clients name and then store the name in an external text file on the clients computer.
The next time the eBook is opened, the clients name can be retrieved from the text file and display it on the pages you want.
This will work for any information you can store in a database or text file.
Unfortunately this is not simple to do. You need to know how to create the code for making the form that collects the clients name ( either in JavaScript or Activ Script ). Then you need to know how to capture that input and store it in a variable. Next you must create the code to write that data to a file using Activ Script.
After the data is stored you will need to be able to retrieve the data the next time the eBook opens. Then you must write the code to display the clients name on the page.
To make matters worse, a lot of this code must be constructed in context with the pages it's going to be use on. That means just having the code "snippets" is not enough. You also must know how to place the code on the page to do what you want. In other words you need to be somewhat familiar with scripting languages and how they are used.
Here is a link to a zipped ebook project I did eons ago - the ebook reads and writes a file, and displays the variables; it doesn't use Activ's FileRead function, as FileRead reads in the entire contents in one long string, and you have to parse it, or use multiple files.
This is not necessary if you read in a .js file.
And, if I recall, the FileRead syntax is written into the script as well, commented out, but available to read in the demo file, to be helpful. I just didn't use it... I wrote to and read a .js file instead.
With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.