I have a PDF form that, until yesterday, was calling nested functions without problem. Then late yesterday, I noticed that all calls to functions outside of the initial command (onClick, etc.) weren't getting called.
For example, I have a checkbox that has the following in its MouseUp Action -> Run Javascript:
app.alert("I was just clicked...");
This works fine, the alert dialog box pops up and gives me the alert. But when I create a document-level JavaScript function as follows:
function fAlert() {
app.alert("I just got clicked...");
}
and then call it from the MouseUp Action -> Run Javascript:
fAlert();
nothing happens. I checked Acrobat's settings to see if something accidently got toggled and I couldn't find anything.
All functions that were previously working and signed off by the developer are now non-functional. Something seems to have changed in the Acrobat Environment itself, but I can not figure out what.
Any help?
I went back to a previously-saved version and the functions all work fine (those that were completed and signed off, anyway...). So it's not a preference or setting within Acrobat itself.
My only conclusion is that somehow the XML tags in the Acrobat script itself got changed. This is why Adobe tells you don't change any of the XML tags.
I will have to go back and start over from the last known good version and catch up. I can only conclude that this happened while I was using an external JavaScript editor. Sometimes, if you aren't careful in saving your work immediately and then go try to edit a different script, the editor will puke on you and overwrite the previously-worked on script with the new one.