Home
   
Login Options

Search
 Advanced   
Sign up for a WebBoard account Forum Home
Sign up for a WebBoard account Forum Classic
Sign up for a WebBoard account Forum RSS Feeds
Sign up for a WebBoard account Sign Up
More Options... Options
Help Help
Log in to WebBoard Log in
Planet PDF
PDF Store


PLATINUM
SPONSOR

GOLD
SPONSORS



Topic  
Go to previous topicPrev TopicGo to next topicNext Topic
Author Message
mhicks
mhicks

Total Messages 3

Subject:auto tab

Help, I am very new to all this and know nothing about scripts. I have been reading lots of topics about this and have no clue what y'all are talking about. I am trying to make the tab move automatically to the next box when a single character box is filled in. Could someone send me a script to copy and let me know what to do with it in non-computer pro lingo? In other messages with scripts attached I can't tell what is what or what to do with it. I appreciate any help and sorry to be an irritating newbie!


Posted: 15 Feb 2005 02:51 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
gkaiseril
gkaiseril

Total Messages 2888

Subject:auto tab

You first have to add a document level script that will tab to the next field when the preset character limit of the field being completed is reached. You then can enter as a custom format keystroke JavaScript the call to the function.

You can add the following document level script to provide an Auto Tab command. From Acrobat's menu bar select "Tools -> JavaScript -> Document JavaScripts...". Enter the script name as "AutoTab". Replace the system provided code with:

// ---> start code
function goNext(oItem, oEvent, cName, bAlpha) {
/* Tab to next field when field character limit is reached.
Includes alpha fields and case change.
Includes error trapping and displays on JavaScript console
the error, field where error occurred and next field name.

parameters:
oItem - required - item where fields to process reside
oEvent - required - field being processed
cName - required - next field's name
bAlpha - optional - identifies an alpha field

Place call to this function in the fields custom format.
The user responsible for checking format of field.
Default number check is for the standard numeric values.
"0-9" for single character fields and includes sign values for multi character fields.

Call for number field:
goNext(this, event,"NextField");

Call for alpha with forced upper case:
goNext(this, event "AlphaNextField", true);

*/
try{ // error catcher
if (bAlpha) {
if (AFMergeChange(oEvent).length == oEvent.target.charLimit) oItem.getField(cName).setFocus();
}
else {
AFNumber_Keystroke(0, 0, 0, 0, "",true);
}
if (oEvent.rc && AFMergeChange(oEvent).length == oEvent.target.charLimit) oItem.getField(cName).setFocus();
} catch(eMsg) { // trap error display error message, field in and next field
app.beep(3); // beep
console.println("Error: " + eMsg + "\nField: " + oEvent.target.name + "\nNext Field: " + cName);
} finally { // always run
return; }

} //end // goNext
// ---> end code

Save the code and close the "JavaScripts" window.

Into each field you want to Auto Tab add one of the following scripts to the "Format" tab's "Custom Key Stroke Script" for either a numeric field or an alpha field:

// ---> start code for numeric values
goNext(this, event,"NameOfNextField");
// --> end code

// ---> start code for alpha field
goNext(this, event,"NameOfNextField", true);
// ---> end code

Replace "NameOfNextField" with the name of the next field to tab to in quotes. You will have to handle any special validation requirements for the information being inputted.



DocumentTaxFreeTransportationProgramBaseTest.pdf
Example simple auto tab

Posted: 15 Feb 2005 06:57 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
mhicks
mhicks

Total Messages 3

Subject:auto tab

Okay, I am doing this in Designer, and there is no toolbar or anything. Not sure how to enter this script in this program...any idea?


Posted: 16 Feb 2005 07:30 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
gkaiseril
gkaiseril

Total Messages 2888

Subject:auto tab

I do not use LiveCycle, but here is an article about accessing the Acrobat Doc object.

Accessing the Acrobat Doc Object in LiveCycle Designer by Chris Dahl


Posted: 17 Feb 2005 02:24 AM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
   
Go to previous topicPrev TopicGo to next topicNext Topic

go



SILVER
SPONSORS


Top | News | Developer | Find PDF Tools | Buy PDF Tools | Sponsorship | Tips | Home



PDF Store - Software for Adobe Acrobat and PDF users PDF Store - an extensive range of the key tools for creating, editing and delivering PDF files. Planet PDF - a comprehensive, independent site exclusively focused on Adobe Acrobat/PDF users and uses. Planet PDF - Resources for Adobe Acrobat and PDF users

Please post PDF-related questions to our Planet PDF Forum forum.planetpdf.com. To send comments about this site please visit our contact page.
Planet PDF, PDF Store, Planet PDF Forum, Planet PDF Web Expo, ARTS PDF and Nitro PDF are all copyright
© 2007 Nitro PDF, Inc. and Nitro PDF Pty Ltd. All Rights Reserved. Privacy policy.