These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Comit change when loose focus on text field

frasersnow
Registered: Feb 4 2009
Posts: 3

I have a text field that updates another text field. If the user enters data in the first text field, then selects print from the menu, the document will print without the second text field being updated.

If the user presses enter or selects another field all is OK. I was wondering if there is way of either forcing the commit if focus is lost on the first field, or forcing all commits if a menu item like print is selected.

Thanks for your help.

My Product Information:
Acrobat Pro 6.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
That's interesting, printing should cause the data to commit. I just gave this a try in Acrobat 8 using a format event on one field to put data into another field, and didn't have a problem. I use the format event because it's the last one called in the commit chain.

Which event are you using? You could try to force the issue with a WillPrint script that forces the focus to some neutral field on the form, like a button.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

frasersnow
Registered: Feb 4 2009
Posts: 3
Thanks for the fast reply. I have two text fields named "Text1" & "Text2". I have placed "this.getField("txtBarcodeText").value = event.value;" in Custom Format Script of "Text1".If I make an entry in "Text1" and either click on the form or the print icon, the "Text2" is populated. If I click on the menu "File" then "Print" - this is where is does not seem to commit.

Also tried placing in the custom key stroke script but "Text2" always seems to be one key behind