help modify the script
Could someone possibly help me and modify code for me?
I would need to change from "edit_text" to "popup" with selections t1,t2,t3 and "ok" button to write selections to text field. I'm trying this whole day and just can't figure it out.
var dlg = {
commit: function(dialog)
{
var data = dialog.store();
this.strName = data["usnm"];
},
butn: function(dialog){
dialog.end("butn");
},
description: { name: "", elements: [
{
type: "static_text",
name: "",
char_width: 15,
alignment: "align_center",
font: "dialog",
bold: true,
},
{ type: "cluster", name: "",elements: [
{ name: "", type: "static_text", },
] },
{ type: "cluster", align_children: "align_row", elements: [
{ name: "", type: "static_text", },
{ item_id: "usnm", type: "edit_text", char_width: 4, },
{
type: "button",
item_id: "butn",
name: "Reset"
}
]},
{ type: "ok_cancel",
ok_name: "Ok",
cancel_name: "Cancel",
},
] }
};
var dialogReturnValue = app.execDialog(dlg);
if ("ok" == dialogReturnValue) {
this.getField("field").value = dlg.strName;
} else if ("butn" == dialogReturnValue) {
this.getField("field").value = "";
}
