Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Open PDF Form before running Document Level scrip
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Open PDF Form before running Document Level scrip

 Post Reply Post Reply
Author
parteegolfer View Drop Down
New Member
New Member


Joined: 25 Mar 2013
Location: Illinois
Points: 5
Post Options Post Options   Quote parteegolfer Quote  Post ReplyReply Direct Link To This Post Topic: Open PDF Form before running Document Level scrip
    Posted: 13 Dec 2016 at 6:58pm

I have this Code in a document level script. The problem I am encountering is that this question box shows up before the actual form loads. I need to ensure that the form is blank before this pops up and before any other script is run. I cant fiqure this out and can use some help. I have tried the app.setTimeOut function (see second line from the bottom of the code). But no luck. Any suggestions would be appreciated!! I am goin crazy trying to figure this out and I am sure there is a simple answer. 

Document Level Code

function IncreaseReportNumber()
{
var vButton = app.alert({
cMsg: "Do you want to advance the report number?",
cTitle: "A message from Dan Sajdak",   nIcon: 2, nType: 3  });


if ( vButton == 4  )
{
//Increase Report Number
var oField = this.getField("REPORT NUMBER");

if(oField == null) app.alert("Error in field name: REPORT NUMBER\Check spelling and capitalizaton.", 1, 0);
oField.value ++ ;
oField.defaultValue = oField.value ;

}
else
{

// more debugging code;
app.alert("number not updated", 3, 0);

} // end response 4;
return
} // end IncreaseReportNumber function;

//app.setTimeOut("IncreaseReportNumber()",250);

IncreaseReportNumber();

 

Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.063 seconds.