Skip to main content
Known Participant
December 12, 2017
Answered

getting error in JavaScript

  • December 12, 2017
  • 1 reply
  • 591 views

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:" ;

This topic has been closed for replies.
Correct answer try67

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\".";

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
December 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\".";

omanbuxAuthor
Known Participant
December 12, 2017

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