This might be an issue with where you are placing the JS. Instead of executing the JS 'on enter' of the frame, try the following:
1. Create an advanced action 'on enter'
2. For the first Action choose 'delay next action by' and put in .01 seconds
3. The next action should be to execute your JS.
If this works (which it might not), it's because the JS is being executed before the elements on the page have loaded. This (if it does work) is sometimes a really easy workaround.
I'm using Adobe Acrobat Pro DC and under the actions of the textfield and the action under the button, I don't see a way to create an advanced action on enter.
If possible, I'd like to eliminate the need for the button all together but if it is necessary to execute the script in the textfield box, then so be it. Am I misunderstanding what you are saying? Remember, my knowledge of Adobe is basically nonexistent.
Sorry I didn't see the Adobe Acrobat Pro part. I thought you were using Captivate.
I am also wondering if this is a question related with Captivate at all?
Please, which Adobe application are you using? I could move your question to the appropriate forum.
I'm sorry - I didn't realize I posted in the wrong program section. I'm using Adobe Acrobat Pro DC
OK, will move your thread.
But, Ideally, the place to put the script is on the Document Save Action. But this will update the number every time the form is saved. Every time. If you want the number to only be set once per user, then that's more complicated.