Skip to main content
Known Participant
October 7, 2019
Question

Illegal Character in Acrobat Script

  • October 7, 2019
  • 4 replies
  • 2068 views

Hello,

 

I'm very new to javascript and I'm working with a form to hide fields according to which layers are selected.

 

There are 5 layers in this form each with about 30 fields per layer. I'm using the framework of a script that works in another form. I received help from a coworker to create the other form.

 

In this form I am basically just updating the field names. When I input a sample section of the script into the new form the error "SyntaxError: illegal character 84: at line 85" showed up. The line reads 

 

this.getField(“JKP1”).display=display.hidden;

 

I've re-typed it but it still doesn't work. What is character 84? Any help will be greatly appreciated.

    This topic has been closed for replies.

    4 replies

    Nancy OShea
    Community Expert
    Community Expert
    October 8, 2019

    Moved thread from Get Started to Acrobat.

    Nancy O'Shea— Product User & Community Expert
    Legend
    October 8, 2019

    So far as I know, this.getField points very strongly at Acrobat Pro being the product. I'm guessing, but it's likely.

    Nancy OShea
    Community Expert
    Community Expert
    October 8, 2019

    Which Adobe product are you using?

    HTML form scripting should be performed in a  dedicated code editor like Dreamweaver or Brackets, not a word processor like Word.

    Nancy O'Shea— Product User & Community Expert
    ANP55Author
    Known Participant
    October 8, 2019
    It is Adobe Acrobat Pro.
    Legend
    October 7, 2019

    Are you typing this up in Word first, then copy/pasting? If so, DON'T! It messes up the quotes. Look closely at the quotes around “JKP1”. They are different to each other! Worse, neither one is the one you need as in "JKP1".

    ANP55Author
    Known Participant
    October 8, 2019

    I copied it to Word at first but then transferred it to Notepad. I don't see any other quotes to use on my keyboard...