Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Urgent help needed - setFocus to anothe field when a text limit is reached.

$
0
0

I've been working on this all day and can't make any progress. I'm desperate for a solution.  Please help.

 

I have a text field into which I'm scanning two bar codes. When the length of the text string = 36, I want to setFocus to another field.

 

The Scanner can send a TAB at the end of each read, but sometimes it doesn't get to the event handler in PDF, so nothing happens.

 

I tried using code in the Keystroke custom format action, but again, the event.value.length misses some of the characters until I tab out of the field, then it corrects itself. 

 

I know all the letters were read in because it corrects itself upon blur.  But I need to it to fire off the blur automatically when 36 chars are entered.

 

The code I'm having trouble with is very simple, it just doesn't work until I manually hit the TAB key: in the keystroke format action:



If (event.value.length >=35) {

     this.getField("ProcessScans").setFocus();

}.

 

Any ideas? Suggestions?  kind words?

 

Thanks

James


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>