Use of app.setInterval



I have a simple save function (autoSav()) in a script object (Skip). The function operates as it should when used from say, the mouse-up event on a button.; it is a trusted function to save the form back on itself.

function autoSav()


  var myDoc =;

SavInsp(this, myDoc.path);


However, when trying to get the following to work: var timeout = app.setInterval("xfa.form.form1.Insp_Report.Skip.autoSav()", 10000); I get errors indicating Skip is not defined or the function is not defined. I have tried multiple syntax changes w/o a cure.

Any direction would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)





Your code looks ok.  I normally put my script objects at the top level so it would be;

var timeout = app.setInterval("xfa.form.form1.Skip.autoSav()", 10000);

Try this code and see where it's starts going wrong;

var timeout = app.setTimeOut("app.alert(xfa.form.form1.somExpression)", 1000);

var timeout = app.setTimeOut("app.alert(xfa.form.form1.Insp_Report.somExpression)", 1000);

var timeout = app.setTimeOut("app.alert(xfa.form.form1.Insp_Report.Skip.somExpression)", 1000);