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

Javascript Syntax error

New Here ,
Oct 09, 2018 Oct 09, 2018

Copy link to clipboard

Copied

Good morning,

I am having an issue figuring out what is wrong with my java script.  I copy and pasted an old one I used (and worked/works fine), but this time it's giving me a syntax error.  Any help is greatly appreciated, I'm sure it's something simple I'm missing.  I am creating a submitable form.

It tells me "SyntaxError: missing } after property list 5: at line 6".

var DEPT = this.getField("DEPT").valueAsString;

var RQSTNAME = this.getField("RQSTNAME").valueAsString;

var PROJNAME = this.getField("PROJNAME").valueAsString;

var LEADER = this.getField("LEADER").valueAsString;

  1. this.mailDoc({cTo:"email@email.com", cSubject: "Project request for: Dept "+DEPT+" - Requestor "+RQSTNAME+" - "+PROJNAME+" - "+LEADER+", cMsg: "Please see the attached project request."});
TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.7K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Oct 09, 2018 Oct 09, 2018

I recommend using a plain-text editor that has code coloring capabilities, like Notepad++. If you do that it will become immediately clear what the issue is. Here's how it looks like:

As you can see, the string after +LEADER+" is not closed, which screws up the rest of the line.

You can remove the last part of it entirely, so just end with +LEADER .

Votes

Translate

Translate
Community Expert ,
Oct 09, 2018 Oct 09, 2018

Copy link to clipboard

Copied

I recommend using a plain-text editor that has code coloring capabilities, like Notepad++. If you do that it will become immediately clear what the issue is. Here's how it looks like:

As you can see, the string after +LEADER+" is not closed, which screws up the rest of the line.

You can remove the last part of it entirely, so just end with +LEADER .

Votes

Translate

Translate

Report

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 ,
Oct 09, 2018 Oct 09, 2018

Copy link to clipboard

Copied

LATEST

Awesome thanks!!

Votes

Translate

Translate

Report

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