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

getting error in JavaScript

Participant ,
Dec 12, 2017 Dec 12, 2017

hi, i'm getting "SyntaxError: missing ; before statement" error in bellow code. can u pls help me to solve this issue. thanks..

var s1 = getField("aa").valueAsString;

var s2 = getField("bb").valueAsString;

event.value = "THIS AGREEMENT (the "Agreement") is made on" + s1 + ", by and between Sterling & Pope Publishing Corp, DBA, and hereafter referred to as, "The Painting Pro Guys" ('Master Licensor'), 7462 Chinaberry Lane, Frisco, Texas 75033 and " + s2 + " , of Texas, on the basis of the following understandings and agreements:" ;

TOPICS
Acrobat SDK and JavaScript , Windows
531
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

correct answers 1 Correct answer

Community Expert , Dec 12, 2017 Dec 12, 2017

If you want to include double-quotes within a string that's delimited by such quotes you have to escape them, like so:

var myString = "This string contains \"double-quotes\".";

Translate
Community Expert ,
Dec 12, 2017 Dec 12, 2017

If you want to include double-quotes within a string that's delimited by such quotes you have to escape them, like so:

var myString = "This string contains \"double-quotes\".";

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
Participant ,
Dec 12, 2017 Dec 12, 2017
LATEST

thanks a lot. now my code working perfectly. thanks again..

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