javascript if statement

herveys81193086

25-06-2015

Hello,

I am not good at javascript so I got this button "Save as..." and a javascript messagebox comes up asking if they secure the document before save it:

xfa.host.messageBox("WARNING", "Did you secure the document prior saving it?", 3, 2);

If they say 3 (yes), the javascript code should be apply: app.execMenuItem("SaveAs");

If 2 (no), go back to the document. Anyone can help?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

jasotastic81

29-06-2015

OK, here's working script.

btnSaveAs::click

if (xfa.host.messageBox("Did you secure the document prior to saving it?", "WARNING",2,2) == 4) app.execMenuItem("SaveAs");