I think the variable names may be causing a problem. I commented out the variable names, and it worked correctly, except for name. I had to change it to empName instead. Then that one worked. There's a good bit of overlap between your variable names and object names. (e.g., var assocID = assocID.rawValue) That was causing problems, too.
Here's what I ended up doing to make the alerts/email work:
//Create a variable to hold the document object
var empname = empName.rawValue;
var jobtitle = jobTitle.rawValue;
var mgrname = mgrName.rawValue;
var associd = assocID.rawValue;
var accvachrs = accVacHrs.rawValue;
//NAME
if (empName.isNull){
xfa.host.messageBox( "Please enter your name" );
xfa.host.setFocus("page1.empName");
}
//JOB TITLE
else {
if (jobTitle.isNull){
xfa.host.messageBox( "Please enter your job title" );
xfa.host.setFocus("jobTitle");
}
//MANAGER'S NAME
else {
if (mgrName.isNull){
xfa.host.messageBox( "Please enter a your manager's name" );
xfa.host.setFocus("mgrName");
}
//ASSOC ID
else {
if (assocID.isNull){
xfa.host.messageBox( "Please enter your Associate ID" );
xfa.host.setFocus("assocID");
}
//ACCRUED VAC HOURS
else {
if (accVacHrs.isNull){
xfa.host.messageBox( "Please enter your accrued vacation hours" );
xfa.host.setFocus("accVacHrs");
}
else {
page1.Button4.execEvent("click");
}
}
}
}
}