我的對話框中有兩塊木條,一塊是文本框(左邊框),另一塊是帶有四個選項(選項1,選項2,選項3,選項4)的下拉菜單。我的要求是顯示/當用戶僅選擇選項3和選項4時啓用textfiled。 我添加了監聽器(selectionchanged)節點到下拉字段。 loadcontent事件觸發但selectionchanged工作不正常。請從下面的代碼片段selectchanged事件不起作用
的SelectionChanged:
function(field,value){
var layoutoption = "";
layoutoption = field.findParentByType('dialog').form.findField('./footerstyle').getValue();
alert('layoutoption :'+layoutoption);
if(layoutoption =='3' || layoutoption =='4'){
field.findParentByType('dialog').form.findField('./leftPadding').enable(this);
}else {
field.findParentByType('dialog').form.findField('./leftPadding').disable(this);
}}
什麼是對話框結構?您在開發者控制檯中發現的任何JavaScript錯誤? – rakhi4110