Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't figure out what the error message means (Javascript)

Status
Not open for further replies.

BenoitST

Programmer
Jul 13, 2018
1
CA
Hi everyone, mind you, I'm a begginer in every sense of the word.

I'm writing a code for an adobe acrobat fillable form and when I go to save the code, it gives me this error message: "SyntaxError: missing ; before statement 2: at line 3"

Here's the code:

// Place all pre-population data into a single data structure
var DeptData = Soins:{ contact: "Jennifer Barbieri", email: "accounting@mycomp.com" }, Administration:{ contact: "Gérald Lachapelle ", email: "engineering@mycomp.com" }, Animation :{ contact: "Daniel Keays", email: "marketing@mycomp.com" }, Buanderie:{ contact: "Maria Vanderworst", email: "it@mycomp.com" }, Entretien ménager:{ contact: "Maria Vanderworst", email: "accounting@mycomp.com" }, Cuisine:{ contact: "Maria Vanderworst", email: "accounting@mycomp.com" }, Maintenance:{ contact: "Daniel Robichaud", email: "accounting@mycomp.com" }};
function SetFieldValues(cDeptName) {
// Populate fields with values from the Department Data Object
this.getField("DeptContact").value = DeptData[cDeptName].contact;
this.getField("DeptEmail").value = DeptData[cDeptName].email;
}

Also, it highlights this part in specific: function SetFieldValues(cDeptName) {

I'm following this tutorial:
Can any of you figure out what the error message means?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top