Copy link to clipboard
Copied
I'm still looking for help with this. One button to undo and one button to redo. Can someone provide a little help with this? I just can't find any javascript that will help me achieve these buttons. I have four text fields (total1, total2, total3, total4) and next to each I want to have the undo button and redo buttons for each total fields. Pretty basic. Like this, check box - click it to undo and if possible, to uncheck it to redo total1 field. And so on for the other three total fields. Or a second check box to redo total1. If you can help, please don't hesitate. Thank you.
1 Correct answer
Forget the terms "Undo/Redo", they are incorrect and not relevant to this issue.
I have already answered your question here: Re: need help with a button that would delete an amount, then to show it again?
Go over it again and you'll see that the solution I provided there is the right way to do what you're after.
Copy link to clipboard
Copied
Do the Undo and Redo menu items do what you wish (except for not being buttons)? (Don't use a browser!)
Copy link to clipboard
Copied
I wasn't seeking suggestions. I'm familiar with my acrobat program enough to know the options. What I'm needing is a little bit of javascript to attach to a button to Undo and the other button is to Redo. That would be the option I'm needing.
Copy link to clipboard
Copied
Exactly how are the field values of the total fields being set?
Copy link to clipboard
Copied
Hello Mr Johnson, the values of the total fields are basic. Simple summing calculations. What I'm trying to do with the check box(s) is to name the total field in the javascript (total1) and with a click of the check box, Undo the total1 field, click and uncheck the check box and total1 will repopulate. I'm not trying to Reset the field, but to remove the named total1 field from the Grand Total of the total1, total2, total3 and total4 fields temporarily. Then to redo the total1 field amount if the check box is unchecked.
The problem is I don't know javascripting so I really don't know how to approach this. So, I have to ask for examples to learn from and see how will work. I don't want to use the Edit>Undo option in the Acrobat or Reader. I really would like to have these check boxes next to each total field and that would treat each total field with an individual Undo/Redo.
Thank you for your time, Mr Johnson.
Copy link to clipboard
Copied
Why don't you answer my question? Do the menu items do what you want (except for not being buttons)?
Copy link to clipboard
Copied
because you are not answering my question or helping with what I want to do. I asked for how to attach a javascript to a button that would Undo/Redo a specific field. Easy. I already know that I can Undo/Redo found under the menu item Edit of the program. What you're suggesting but not what I'm asking. I was asking for help with a javascript that would do the same thing that I could attach to a check box. See the difference? You didn't answer what I was asking help with. I don't want to use the menu item. I want to use my own buttons. OK? I hope you understand now?
Copy link to clipboard
Copied
You're awfully quick to decide what will and won't help you for a person who admits he doesn't understand JavaScript and wants others to do his work for him. Well, good luck with that.
Copy link to clipboard
Copied
I don't know who you are, but I just want to add this, I'm not wanting anyone to do the work for me. The basis of this site is to get help, discuss and offer help to those that are trying to learn javascript. Not to belittle and embrass those seeking help like you have chosen to respond with.
Your suggestion advice does not help. It was tried and you act surprised it was not correct answer.
I have to ask, please refrain from this sort of responding. It is not in the spirit of this site.
Copy link to clipboard
Copied
Forget the terms "Undo/Redo", they are incorrect and not relevant to this issue.
I have already answered your question here: Re: need help with a button that would delete an amount, then to show it again?
Go over it again and you'll see that the solution I provided there is the right way to do what you're after.
Copy link to clipboard
Copied
I'm trying the script again. And I understand it better. It does really come very close to doing what I want. I thank you for chiming in with the script. You're the only one that responded with a little script that works. I think it can be modified and that I can learn from it. Let me play around with it and I'll let you know the outcome. Until then, thanks again and a thumb's up.
Copy link to clipboard
Copied
I really don't understand the request. Are the total fields calculated? Are you just trying to force a recalculate?
Copy link to clipboard
Copied
Hey Joel, all I'm trying to get help with is a check box that will do a Undo of a field and uncheck it and it will Redo. I need a little script that would enable me to click the box and the specific field (in this case it's the total1 field) will be removed from the calculation and uncheck it and it puts the amount back into the calculation.
Just like if you deleted a field information then went to Edit>Undo. The field information would then be returned to that field. I just don't want to go that route. I'd like to use a script. That's all I need.
Copy link to clipboard
Copied
In your calculation you can check the value of the check box.
Copy link to clipboard
Copied
Ok - I'm testing for understanding again. What I think you want is to have a checkbox beside a field that will determine if the value in that field is included in the calculation for a total in another field or not. If checked, the value is included, if unchecked it's not. Did I get that right?
Copy link to clipboard
Copied
you got it.
Copy link to clipboard
Copied
I asked you a question because I wanted you to answer. It was NOT a hint or suggestion. Because two entirely different solutions suggested themselves depending on your answer. You chose to ignore my attempt to help, instead. I take this as intolerably rude, but perhaps I'm out if touch. I'll try not to trouble you again.

