How to Set an option value selected

Hi,

I have form with 5 fields(select,input,input,input & button).

Can somebody tell me how to set “selected=true” for the select options dynamically.

Below is my form.

var myForm=destwin.attachForm([
{type:“settings”,offsetLeft:“16”, position:“label-left”,labelWidth:110},
{type: “select”, name: ‘desttype’, label: ‘Destination Type :’,value:"",className:“even”,
options:[
{value: “1”, text: “JMS”,selected:false},
{value: “2”, text: “FTP”,selected:false},
{value: “3”, text: “Tibco”,selected:false},
{value: “4”, text: “IBM MQ”,selected:false},
{value: “5”, text: “QCBS”,selected:false}
]},
{type: “input”, label: “Description :”,value:desc,className:“uneven”},
{type: “input”, label: “Direction :”,value:dir,className:“even”},
{type: “input”, label: “Class Path :”, value:clsname,className:“uneven”,width:250},
{type: “button”, name: “save”, value: “Save”,className:“even”}
]);

Hi

{value: “2”, text: “FTP”,selected:false}
change to
{value: “2”, text: “FTP”,selected:true}
and it will be selected