Document Action will close
Hi ,
I'm trying to ask the user to change his mind if he didn't really want to exit from the (Opened PDF Doc),, so i go to Document Action at (Document will close) and write the following :
var cMsg = "Are you sure you want to close ?";
cMsg += "\n\n";
cMsg += "Contiunue ? \n\n ";
var nRtn = app.alert(cMsg,2,2,"Warning ! ");
if(nRtn == 4)
{// A yes Response
// Code for doing the thing you do on a yes
this.closeDoc();
}
else if(nRtn == 3)
{ // No Response
//event.value = 0; // assume do nothing
beep
!this.closeDoc();
}
else
{ //Unknown Response
beep
!this.closeDoc();
}
But the Above Code is Closing the Document even if the user hit yes or no? ho do i change it to not close the document if the user hit (No)... thanks for any tip
