3 Replies Latest reply on May 24, 2012 5:07 AM by Mathias Wilkens

    How to dismiss app.alert

    Mathias Wilkens Level 1

      Hi,

       

      I have a message that displays when opening my PDF form.

       

      The form will be opened several times, so I want to give users the option to dismiss the message, so it only appears the first time.

       

      I have tried to use a script by Ted Padova, but I cannot make it work.

       

      This is the code I have "borrowed":

      ________________________________________

       

      if(typeof(global.bShowWarning1) ==

      {

      global.bShowWarning1 = true;

      global.bPersistWarn1 = false;

      }

      if(global.bShowWarning1)

      {

      var oCk = {bAfterValue:false};

      app.alert({cMsg:"Instructions: Fill out this form carefully and click the Submit Form button when finished.", nIcon:1,oCheckbox:oCk,cTitle:"Reminder"});

      global.bShowWarning1 = !oCk.bAfterValue;

      }

       

      ________________________________________

       

      I get the following syntax error code:

       

      SyntaxError: missing: after property id

      3: at line 4

      Ln 11, Col 2

       

       

      Any help is greatly appreciated!

       

       

      PS: I am using Acrobat X pro

       

      /Mathias