Greetings,
I'm using 7.0rc. I have a dynamic form with a search field. When the user clicks off of the field, if it's empty, I want to disable the add button. This works if I put an alert() in before the setEnabled(false) statement. Without the alert(), nothing happens. Any ideas?
I'm using 7.0rc. I have a dynamic form with a search field. When the user clicks off of the field, if it's empty, I want to disable the add button. This works if I put an alert() in before the setEnabled(false) statement. Without the alert(), nothing happens. Any ideas?
Code:
isc.DynamicForm.create({ fields:[ {prompt:"Search for companies to add to your portfolio by entering a ticker symbol, full or partial company name, NAIC code, or group name.", hint:"Click here to add companies to your portfolio.", showHintInField:true, ID:"folioQuickSearchField", name:"folioQuickSearchField", showPickerIcon:false, selectionType: "single", showFocused:false, selectOnFocus:false, optionDataSource: "PortfolioCompanySearchDS", editorType: "comboBox", showTitle:false, width:420, pickListHeaderHeight:1, pickListFields: [ {name: 'company_code_dis', showTitle:false, width:55}, {name: 'stmt', showTitle:false, width:35}, {name: 'company_name', ID:'company_name', showTitle:false, width:260}, {name: 'ticker', showTitle:false, width:50}, {name: 'company_code', showIf:"false"}, {name: 'subscribed', showIf:"false"}, {name: 'ins_type', showIf:"false"} ], getPickListFilterCriteria : function () { var value = this.getDisplayValue(); if (value == '') { value=' '; } return {value:value}; }, focus: function (form, item) { if (item.getValue() != null) { findAddbtn.setEnabled(true); } }, change: function (form, item, value, oldValue) { if (item.getValue() != null) { findAddbtn.setEnabled(true); } }, blur: function (form, item) { alert(); if (item.getValue() == null) { findAddbtn.setEnabled(false); } } }, {startRow:false, disabled:true, ID:"findAddbtn", editorType:"button", width:100, title:"Add Company", click:"processForm('addCompany');folioQuickSearchForm.setValue(folioQuickSearchField,'');this.setEnabled(false)"} ], ID:"folioQuickSearchForm", width:390, autoDraw:false })
Comment