Hello! I have a strange problem that I hope someone can shed a light on for me. I have created some forms on a PDF document where I needed them to auto tab to the next form box after the alotted characters are reached. That part works great with the keystroke script I am using! The problem is that when you click on a form box to edit, you can only backspace a few characters before it automatically takes me to the next box. Here is the keystroke script I am using...
l=event.value.length;
if (l==10)
getField("A.0.1").setFocus();
The (l==10) portion represents the 11 allowed characters in the line before automatically tabbing to the next box, which is "A.0.1" Do I need to add some additional code to this script to fix the backspace issue?
Help!!!
Steve
You could have done a search for 'autotab' and found lots of posts.
[url=http://www.planetpdf.com/developer/article.asp?ContentID=javascript_setfocus_method_f&gid=6267]JavaScript - setFocus Method for tabbing to next form field[/url] by Carl Orthlieb uses the function call 'AFMergeChange(event)' to obtain the character count including the current keystroke which has the actual key count prior to exiting the field, while the 'event.value.length' only has the length value prior to the current keystroke.
George Kaiser