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

SyntaxError: syntax error 4 at line 5

New Here ,
Sep 13, 2023 Sep 13, 2023

I'm trying to make a dependent drop down, I dont want to add anymore options until I get this error straightened out.

 

Haley32269625ct8s_0-1694633530008.pngexpand image

 

TOPICS
Acrobat SDK and JavaScript , Windows
714
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 ,
Sep 13, 2023 Sep 13, 2023

You must only use straight quotes, not curly ones, like after "BERGEN" in the code above (and maybe elsewhere, too).

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 ,
Sep 14, 2023 Sep 14, 2023

Thank you, I thought I had fixed them all but it starts to blend after looking at it for so long.

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 ,
Sep 13, 2023 Sep 13, 2023

You have few errors, 'colon' should be used after statement, not after 'case':

case: '18.XX GENESEE' should be   case '18.XX GENESEE':

and case: 'Choose an option' should be    case 'Choose an option':

Also add 'break' in the last statement or use:

default:
f.clearItems();

 

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 ,
Sep 14, 2023 Sep 14, 2023
LATEST

After moving the colon it and correcting the one quotation this went through, thank you for your help.

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