If/Else statement with this.mailDoc () works does not

All,

I have trouble getting a script to the button runs correctly. On "mouse up", I need the script to check whether or not a specific field has given (it cannot be a required field) and returns an error message or open a this.mailDoc (dynamic). Here is the code:

nTOTAL var = this.getField("requestor_name").value;

If (nTOTAL == "")
{
App.Alert ("Please fill in name before submitting.");
}
on the other
var cToAddr = this.getField("Initial_Email").value;

var cCCAddr = this.getField("Final_Email").value;

var cSubLine = 'time sensitive '.
cbody var = "Please see the attached newsletter. \n » ;
{
this.mailDoc ({bUI: true, cTo: cToAddr, cCc: cCCAddr, bassujetti: cSubLine, CMSG: cbody})
}

Use something like this:

nTOTAL var = this.getField("requestor_name").value;

If (nTOTAL == "")
{
App.Alert ("Please fill in name before submitting.");
}
else {}
var cToAddr = this.getField("Initial_Email").value;

var cCCAddr = this.getField("Final_Email").value;

var cSubLine = 'time sensitive '.
cbody var = "Please see the attached newsletter. \n » ;
this.mailDoc ({bUI: true, cTo: cToAddr, cCc: cCCAddr, bassujetti: cSubLine, CMSG: cbody})
}

Tags: Acrobat

Similar Questions

Maybe you are looking for

  • Cannot type in the address bar or search... even in safe mode

    I use Firefox for years, so I'm not new at this. I already tried in SafeMode... same problem... so who says this isn't an add-on / plugin problem. I have not installed brand new in any case within a period of time. The only thing I can think is playi

  • Fluke Hydra 2625 with NI LabVIEW drivers: can not read the output data

    I work with a Fluke Hydra data logger 2625 have downloaded the drivers from NI LabVIEW, crossed the config., initialize and modes files and now trying to read data from a thermocouple. Initially, I was getting an error message ("17" I think) but now,

  • Problem of Simulation collector design & control

    I try to work on a collector in the simulation loop control & design but I found that there is a problem 1. the data that I collect takes horizontal form, how to change the data of horizontal to vertical? 2. the data that I collect does not move to t

  • HP Universal print driver: printers use duplex for single page documents

    Here's our environment: Print Server Windows 2008 with many different printers HP HP, using UPD. Customers running Windows 7 x 64. We configure default duplexing for environmental issues. When a single document page is printed, the printer uses duple

  • HP Laserjet 5000 series PS drivers

    Sir, I'm looking for a PostScript to HP LaserJet 500 Series PS printer driver for my 64 bit Windows 7 computer. That's my problem; I need a driver that has specific. DLL files. A friend of my has the same configuration with the same printer and its w