Skip to main content
Participant
December 6, 2024
Answered

SyntaxError; missing ; before statement

  • December 6, 2024
  • 2 replies
  • 431 views

Hi, I'm very much a novice to JavaScript, so what is likely a simple resolution is baffling me as to why I'm getting the "SyntaxError; missing ; before statement    1:at line 2" error message in the following code:

 

If (event.value==”Today”) this.getField(“AP”).value = “East”;
else if (event.value==”Tomorrow”) this.getField(“AP”).value = “North”;
else this.getField(“AP”).value = “”;

 

I have a drop-down list and want to populate another field "AP" based upon what the user selects from the list, but that error message occurs and I don't understand why.

 

Thanks for your help!

Correct answer Bernd Alheit

For the strings use " not  ”

2 replies

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
February 16, 2025

For the strings use " not  ”

Meenakshi Negi
Community Manager
Community Manager
February 13, 2025

Hi murray01,

 

Thank you for reaching out.

 

This is something that experts can best answer. We see that you are using the free Acrobat Sign service. If you are using the Acrobat Sign enterprise plan, you may contact our Adobe Sign Enterprise support team for the correct information if you have an Acrobat Sign Enterprise account with an alternate email address. You may contact them using the steps in the following help document: https://adobe.ly/41e7vcB.

 

 

Thanks,

Meenakshi