I was able to get the script that you suggested to work, but it does not really do what I need. (I also searched the forum and help, but I couldn’t find a solution.) Being a novice with scripts, I probably did not explain what I was after very well.
Here it goes: I want the ebook user to be able to enter information (data) into various form text boxes and save it (so that they can refer to it next time they open their ebook) and also update it when they need to in the future.
In other words, the information that the user enters would still be shown in the form text boxes next time they open their ebook.
I did do a search using FSET (and others too), as you suggested, but I could not identify a fit with what I wanted to do.
I carefully looked at the link (topic=268) you provided and the previous one as well, many times, and tested them too. But I still cannot figure out how to make it all work to accomplish what I want to do. I must have a broken circuit in my brain or something.
Sorry to be a pest, but I have many uses for this capability in my ebooks.
To reaffirm: I just want user “entries” into one-line form text boxes to “remain” there so that the user will be able to view it and/or update it next time they open their ebook or turn pages back to it. I do not need to save the entries to a file, as the ebookcode.com and forum examples do.
Suddenly I had a moment of clarity after reading your last post.
I hadn't previously understood the question correctly, and where your difficulty lay.
What you need to do is 2 steps:
1. Write an Activ Script to display the form. In the form it populates the form fields based on values you read back from a file.
If you don't find the file, then the form fields initial values are blank
What you do is concanentate the HTML all together in one long string, then display it using the DISPLAY command.
2. When the form is submitted, you run a second script. This saves the values entered into the file (using a similar approach to the link I gave previously).
I hope this helps as a 10,000 feet overview.
Now to the details... if you need help on the script coding, get as far as you can, then post what you have.
I would post more, but I can't get to the computer which has the ebook compiler setup for me to show you the exact scripts. The computer is right next to me, but all disconnected and unplugged, and I can't physically bend over to crawl around and plug the cables in, because I hurt my leg playing football on Sunday.
So, if you post as far as you get, I'll try to point you in the right direction. If you're not getting anywhere, let me know, and I will post a detailed follow-up as soon as I can (probably at least a couple of days).
Sunil is a busy guy and if he's gracious enough to provide you with a tutorial on writing files you are a fortunate person indeed. (There are many of us who are hoping he'll devote his time to the release of a greatly anticipated version 5.)
Your request seems pretty straight forward. You appear to want to create a form with a text box, yes? You would like the text entered to persist even after the ebook is closed, then reopened, yes?
If this is not want you want please clarify so someone can help you.
Also, you might contact the author of the thread you referenced. That person may have found the answer and will share it with you.
Storyman, I'm not currently able to work on version 5 at the moment for the same reason as I can't answer Brad's question. It's on the other computer (actually a different other computer, also unplugged. When I got the new PC, I planned on moving things around between desks).
Tomorrow, I plan to try to go downstairs from my flat, which I haven't done since my wife dragged me up the stairs on Sunday evening. I am recovering, but right now, bending over to ground level to do the cables etc., is simply out of the queston.
There seems to be some misunderstanding. I did not originally presented this problem directly to Sunil, but rather to the forum. I too would love to see version 5 and I would not expect that my problem would take priority over that project.
Had Sunil not indicated in his last posting – before your first one - that he had the exact script that I needed “readily” available on his "disabled" computer and had he not indicated a willingness to share it; I would not have pursued the issue.
I did not perceive that what I was asking for might require a tutorial-type of response. But having limited experience with code and scripts, I admit that I may be naive. I have, however, read everything I could find on the subject in the forum and Activ Ebook Help, but have not been able to piece it together.
As I have restated several times in this thread, YES, I want to create a form with one-line text boxes. And I want the text entered in the text boxes to persist even after the ebook is closed and then reopened. And I ALSO want the user to be able to update the entered text during an active session and/or after they close and then reopen the ebook.
In the meantime, I will inquire with the author of the thread I referenced and seek out tutorials to learn more about the subject.
Hopefully, Sunil will be able to get to his computer before long and provide you with the coding he mentioned.
What you're doing sounds pretty straight forward and even if you didn't want to deal with an array you could use a different text file for each text box.
If you still find that you are having difficulty I'll put together a tutorial for you myself. It will take a week before I can get to it (I'm swapping out the main hard drive on the computer used for this.)
No, I am not tied to using an Activ script, but I have to admit that I am quite curious as to what Sunil has in mind for me. In addition, I would like to, at least, have the option to take advantage of the Activ scripts that are available.
I just want to figure out a way, by whatever means, to do what I’ve described without the user having to deal with file saving and hunting. I want that function, if necessary, to be transparent to the user. In other words, I want to arrange things so that the only thing the user has to do is click a button entitled, “Save/Update,” and the information in the text boxes will persist.
I wasn't clear, but the tutorial I'd create would be using Activ Script to demonstrate the coding.
I can’t agree to allow you to create a tutorial just for me. But if you have something canned that you’d be willing to share, it would be appreciated.
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.
Our company's websites' content (including this website's content) includes advertisements for
our own company's websites, products, and services,
and for other organization's websites, products, and services.
In the case of links to other organization's websites,
our company may receive a payment, (1) if you purchase products or services,
or (2) if you sign-up for third party offers, after following links from this website.
Unless specifically otherwise stated, information about other organization's products and services,
is based on information provided by that organization,
the product/service vendor, and/or publicly available information - and should
not be taken to mean that we have used the product/service in question.
Additionally, our company's websites contain some adverts which we are paid
to display, but whose content is not selected by us, such as Google AdSense ads. For more
detailed information, please see Advertising/Endorsements Disclosures
constitutes consent for this. For details, please see Privacy.
Click privacy for information about our company's privacy, data collection and data retention policies, and your rights.