Print Page | Close Window

keystroke and validate scripts, which fires first?

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=1981
Printed Date: 23 Jul 2019 at 7:23pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: keystroke and validate scripts, which fires first?
Posted By: jason.zeiler
Subject: keystroke and validate scripts, which fires first?
Date Posted: 06 Apr 2016 at 9:45pm
I'm using Acrobat Pro DC and I've got a form that has a field that I'm using custom keystroke scripts as well as validation scripts on the same field.  The keystroke script is used to check that field entry has reached character limit and it then sets focus to the next field.  The validation script is checking to see that the text entered into the field is within a certain set of characters which for this field are the numbers 0 & 1.  I seem to be running into issues where the validation script doesn't always catch incorrect text entry and will allow focus to move on to the next field without alerting.  I guess my question is can someone tell me how to know which script fires first, where to find that info, and if possible can it be changed? I'm assuming this is something in source code of Acrobat Pro DC that I'm not going to be able to do anything with.  Hoping someone out there has ran into this problem before and can lend a hand?< id="_npfido" ="applicationpfido" height="0">



Replies:
Posted By: try67
Date Posted: 07 Apr 2016 at 4:17pm
In principle the Keystroke event fires first, but it's a complex process. You can find more about it in the Acrobat JS API Reference, under the "event" object.


-------------
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com


Posted By: Merlin
Date Posted: 30 Apr 2016 at 2:44pm
Hi.

See this figure which explain the event process (English text is gray):




-------------
ENG : https://www.abracadabrapdf.net/utilities-in-english/welcome/ - abracadabraPDF.net
FRA : https://www.abracadabrapdf.net - abracadabraPDF.net



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net