Hello,
I'm getting the error message "missing ; before statement 24" in the following script:
//Create a variable to hold the document object
var StartDate = (xfa.form.form1.page1.signature.StartDate.rawValue);
var EndDate = (xfa.form.form1.page1.signature.EndDate.rawValue);
var assocName = (xfa.form.form1.page1.signature.assocName.rawValue);
var assocID = (xfa.form.form1.page1.subForm1.assocID.rawValue);
var assocEmail = (xfa.form.form1.page1.subForm1.assocEmail.rawValue);
var assocExt = (xfa.form.form1.page1.subForm1.assocExt.rawValue);
var assocDept = (xfa.form.form1.page1.subForm1.assocDept.rawValue);
var mgrName = (xfa.form.form1.page1.subForm1.mgrName.rawValue);
var mgrEmail = (xfa.form.form1.page1.subForm1.mgrEmail.rawValue);
var salariedHourly = (xfa.form.form1.page1.subForm1.salariedHourly.rawValue);
var directReports = (xfa.form.form1.page1.subForm1.directReports.rawValue);
var perfRating = (xfa.form.form1.page1.subForm1.perfRating.rawValue);
var howLongWorking = (xfa.form.form1.page1.request.howLongWorking.rawValue);
//SUBMIT DATE
if (StartDate == "") Then
xfa.host.messageBox( "Please enter a Submit Date" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.StartDate");
//HIRE DATE
elseif (EndDate == "") Then
xfa.host.messageBox( "Please enter a Hire Date" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.EndDate");
//NAME OF ASSOCIATE
elseif (assocName == "") Then
xfa.host.messageBox( "Please enter your Name" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocName");
//ASSOCIATE ID
elseif (assocID == "") Then
xfa.host.messageBox( "Please enter your ID" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocID");
//ASSOCIATE EMAIL
elseif (assocEmail == "") Then
xfa.host.messageBox( "Please enter your email address" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocEmail");
//ASSOCIATE EXTENSION
elseif (assocExt == "") Then
xfa.host.messageBox( "Please enter your telephone extension" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocExt");
//ASSOCIATE DEPARTMENT
elseif (assocDept == "") Then
xfa.host.messageBox( "Please enter your department" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.assocDept");
//MANAGER NAME
elseif (mgrName == "") Then
xfa.host.messageBox( "Please enter your manager's name" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.mgrName");
//MANAGER EMAIL
elseif (mgrEmail == "") Then
xfa.host.messageBox( "Please enter your manager's email address" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.mgrEmail");
//SALARIED HOURLY
elseif (salariedHourly == "") Then
xfa.host.messageBox( "Please enter whether your are salaried or hourly" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.salariedHourly");
//DIRECT REPORTS
elseif (directReports == "") Then
xfa.host.messageBox( "Please indicate whether you have any direct reports" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.directReports");
//PERFORMANCE RATING
elseif (perfRating == "") Then
xfa.host.messageBox( "Please certify your last performance rating" );
xfa.host.setFocus("xfa.form.form1.page1.subForm1.perfRating");
//HOW LONG WORK
elseif (howLongWorking == "") Then
xfa.host.messageBox( "Please indicate how long you anticipate working this arrangement" );
xfa.host.setFocus("xfa.form.form1.page1.questions.howLongWorking");
else
Button6.execEvent("click");
page2.presence = "visible";
EndIf
I've been hunting for several hours and can't seem to find or correct the problem. Can anyone help?
Thanks,
MDawn
Solved! Go to Solution.
Views
Replies
Total Likes
It woudl be easier if I cpoudl see the form in action .....an you send it to LiveCycle8@gmail.com and include a description of how to reproduce the issue.
Paul
Views
Replies
Total Likes
Hi,
your Script is in FormCalc not in JavaScript.
Make shure your set the correct language in the script editor.
Why are you using brackets here?
var StartDate = (xfa.form.form1.page1.signature.StartDate.rawValue);
you can write it as
var StartDate = xfa.form.form1.page1.signature.StartDate.rawValue
Also, in FormCalc you don't need the semicolon ; at the end of the lines.
And, your keywords "Then" and "EndIf" are wrong, correct is "then" and "endif".
if (StartDate == "") then
xfa.host.messageBox( "Please enter a Submit Date" )
xfa.host.setFocus("xfa.form.form1.page1.subForm1.StartDate")
...
elseif (howLongWorking == "") then
xfa.host.messageBox( "Please indicate how long you anticipate working this arrangement" )
xfa.host.setFocus("xfa.form.form1.page1.questions.howLongWorking")
else
Button6.execEvent("click")
page2.presence = "visible"
endif
Views
Replies
Total Likes
I'm still having trouble. I tried to change the script to JavaScript. Now I'm getting "subForm1 not defined" error message. But it appears that subForm1 is set up properly.
Any thoughts?
Thanks,
MDawn
Views
Replies
Total Likes
It woudl be easier if I cpoudl see the form in action .....an you send it to LiveCycle8@gmail.com and include a description of how to reproduce the issue.
Paul
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies