Skip to main content
Participant
July 8, 2019
Question

Javascript syntax error

  • July 8, 2019
  • 1 reply
  • 467 views

i used this exact same script as a custom keystroke script on a different pdf and it’s not working now any help is appreciated.

case "PERIODIC EVAL E4 AND BELOW ICO:":

this.getField("Return").setItems(["MAIN ADMIN"])

this.getField("1").setItems(["MO"])

this.getField("2").setItems(["AMO"])

this.getField("3").setItems(["DIVISION OFFICER"])

this.getField("4").setItems(["DIVISION LCPO"])

this.getField("5").setItems(["DIVISION ADMIN"])

this.getField("6").setItems(["BRANCH CHIEF"])

this.getField("7").setItems(["LPO"])

this.getField("8").setItems([" "])

this.getField("9").setItems([" "])

this.getField("10").setItems([" "])

break;

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 8, 2019

Post the full script and the full text of the error message, please.

Participant
July 8, 2019

SyntaxError: syntax error 1: at line 2

when I take out line 2 that is there I error travels!

try67
Community Expert
Community Expert
July 8, 2019

That's the full code? If so, you're missing the "switch" command.