acrobat xi -- return the value of the radio button selected in a custom dialog (TypeError: this.getElementById is not a function)
i've built custom dialog that's rendering fine. emulated code found here in forum, i'm getting following error:
typeerror: this.getelementbyid not function
presumably need replace "this.getelementbyid" other mechanism return value of radio button selected.
here's code stands:
var odlg =
{
description:
{
name: "save document folder?",
elements:
[
{
type: "cluster",
name: "choose folder",
elements:
[
//{
// type: "static_text",
// name: "save document folder?: "
//},
{
type: "radio",
item_id: "rd01",
group_id: "rado",
name: "completed folder",
value: "complete",
},
{
type: "radio",
item_id: "rd02",
group_id: "rado",
name: "need guidance",
value: "needguidance",
},
{
type: "radio",
item_id: "rd03",
group_id: "rado",
name: "no action needed",
value: "noactionneeded",
},
{
type: "ok_cancel",
},
]
},
]
}
};
// dialog activation
app.execdialog(odlg)
{
if (this.getelementbyid('rd01').checked) {
destinationfolder = this.getelementbyid('rd01').value;
}
else if (this.getelementbyid('rd02').checked) {
destinationfolder = this.getelementbyid('rd02').value;
}
else if (this.getelementbyid('rd03').checked) {
destinationfolder = this.getelementbyid('rd03').value;
}
};
app.alert(destinationfolder,4);
thanks
christian bahnsen
this function browser javascript, not acrobat.
More discussions in JavaScript
adobe
Comments
Post a Comment