Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using Javascript to force tab to go to another field if the choice matches, what´s wrong?

New Here ,
Mar 07, 2016 Mar 07, 2016

I am using this script to force the tab to go to a specific field if the choice matches. However this also happens in several other fields in the document without this script. Can you help me to fix it?

if (this.getField("Details of Loan Drop").value=="Combination of 1ST & 2nd Mortgage (Explain Here)"){

this.getField("Texto25").setFocus();}

if (this.getField("Details of Loan Drop").value=="Combination of 1ST & 2nd & 3rd  (Explain Here)"){

this.getField("Texto25").setFocus();}

TOPICS
Acrobat SDK and JavaScript , Windows
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2016 Mar 07, 2016

‌Where did you add the script?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2016 Mar 07, 2016

I added in the custom calculation script of the field

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2016 Mar 07, 2016

What field?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2016 Mar 07, 2016

In the field were there is a combo box to choose. And if the choice is one of the two: "Combination of 1ST & 2nd Mortgage (Explain Here)" or "Combination of 1ST & 2nd & 3rd  (Explain Here)"

I need the tab to go directly to the field "Texto25"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2016 Mar 07, 2016

At this as action for the trigger "Mouse Up".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2016 Mar 07, 2016

Now, once the selection is chosen, it is not possible to change... Should I have something for mouse down?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2016 Mar 07, 2016

‌Try a other trigger.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2016 Mar 08, 2016

I did try them all, but they all do the same, once the selection is chosen, it is not possible to change

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 08, 2016 Mar 08, 2016
LATEST

Remove any existing script and try the following as the custom Validation script for the dropdown:

// Custom Validate script for dropdown

if (event.value == "Combination of 1ST & 2nd Mortgage (Explain Here)" || event.value == "Combination of 1ST & 2nd & 3rd (Explain Here)") {

    getField("Texto25").setFocus();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines