3 Replies Latest reply on Mar 18, 2013 12:23 PM by Bernd Alheit

    Run message box if not empty?

    crimsonk91

      I have a script to run a message when the field loses focus, I only want it to run if the field is not empty. Right now it runs everytime, here is the script. Can someone please assist me? Thanks in advance.

       

      //Question if client can receive text messages with the phone number supplied

      var cMsg = "Can you send and receive text messages on this phone?";

      var nRtn = app.alert(cMsg,2,2,"Question Alert Box");

      if(nRtn == 4)

      {// Yes Responce

        this.getField("txtYes1").value = "Y";

      }

      else

      {// No Responce

        this.getField("txtYes1").value = "N";

      }

       

      Jeff