1 Reply Latest reply on Oct 1, 2015 1:26 AM by Bernd Alheit

    Why save alert dialog box coming without changing any  in the smart pdf on adding  the code to focus to a form field?

    Alex Doubts Level 1

      Why save alert dialog box coming without changing any  in the smart pdf on adding  the code to focus to a form field?

       

      I am getting the save alert dialog box without making any update in the SMART PDF with the setFocus code .

      Else it works fine by adding this.dirty=false after making all the changes.

      I have set the code in the document level javascript .

      The code is as below: Has highlighted the setFocus Code.  Without it it's working fine.

      function TEST()

      {

      getField("ddlTransferType").setFocus();

           getField("txtCurrentdate").value = util.printd("dd-mmm-yyyy", new Date()).toUpperCase();

          if (getField("Date").value == "") {

              getField("Date").value = util.printd("dd-mmm-yyyy", new Date()).toUpperCase();

          }

       

          this.getField("txtCurrentdate").fillColor = ["RGB", 0.8, 0.8, 0.8];

          this.getField("txtFormReference").fillColor = ["RGB", 0.8, 0.8, 0.8];

          this.getField("txtAmountInWords").fillColor = ["RGB", 0.8, 0.8, 0.8];

          this.dirty = false;

      }

      TEST();