Skip navigation
Mathias Wilkens
Currently Being Moderated

How to dismiss app.alert

May 23, 2012 1:03 AM

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

 
Replies
  • Currently Being Moderated
    May 23, 2012 7:49 AM   in reply to Mathias Wilkens

    Have you defined the global variables bShowWarning1 and bPersistWarn1?

     
    |
    Mark as:
  • George Johnson
    9,232 posts
    Aug 11, 2002
    Currently Being Moderated
    May 23, 2012 9:43 AM   in reply to Mathias Wilkens

    There very first line doesn't make sense. It should be something like:

     

    if (typeof global.bShowWarning1 == "undefined")

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points