Trusted function help
hi all,
i need clarify if looking in right place!
i have form templates, when first page signed there button create second page template (with new signature).
i error:
notallowederror: security settings prevent access property or method.
template.spawn:17:acroform:p0.background.tab:annot1:mouseup:action1
i believe trusted function issue, tried write following accomodate in code:
–––––––––––––––––––––––––––––––
function test()
{
var t = this.templates;
var j = this.pagenum;
var t = t[0];
var s = t[1];
var r = t[3];
var q = t[2];
// checks other field value before selecting correct template
if (this.getfield("p"+j+".background.dropdown4").value == "other"){
t.spawn({npage: numpages, brename: true, boverlay: false});
q.spawn({npage: numpages - 1, brename: true, boverlay: true});
app.alert("a new page has been added")
}else if (this.getfield("p"+j+".background.dropdown4").value == "option 1"){
t.spawn({npage: numpages, brename: true, boverlay: false});
s.spawn({npage: numpages - 1, brename: true, boverlay: true});
app.alert("a new page has been added")
}else if (this.getfield("p"+j+".background.dropdown4").value == "option 2"){
t.spawn({npage: numpages, brename: true, boverlay: false});
r.spawn({npage: numpages - 1, brename: true, boverlay: true});
app.alert("a new page has been added")
}else if (this.getfield("p"+j+".background.dropdown4").value == "select..."){
app.alert("please make selection, category");
}};
app.trustedfunction(test);
–––––––––––––––––––––––––––––––––
i have document level javascript im not usre if correct, want avoid creating js folder hold script have many users.
because acrobat x uses trusted function need update quite few forms, appreciated.
the spawn method not require trusted context. has fact you're trying edit signed document, though...
More discussions in JavaScript
adobe
Comments
Post a Comment