jQuery MiniUI

标题: 有根据combobox选中的值,动态改变button的allowInput属性方法吗 [打印本页]

作者: csq    时间: 2017-11-27 12:05:17     标题: 有根据combobox选中的值,动态改变button的allowInput属性方法吗

有根据combobox选中的值,动态改变button的allowInput属性方法吗

作者: dforce    时间: 2017-11-27 13:46:59

监听combobox的valuechanged事件,动态设置buttonedit的属性
combo.on("valuechanged",function(e){
     buttonedit.setAllowInput(false)
})
作者: csq    时间: 2017-11-27 15:15:55

dforce 发表于 2017-11-27 13:46
监听combobox的valuechanged事件,动态设置buttonedit的属性
combo.on("valuechanged",function(e){
      ...

<input class="mini-combobox"  id="externalPersonne" name="externalPersonne" property="editor" data="TrueFalse" onvaluechanged="externalPersonne(this.value)" />
<input class="mini-buttonedit" onbuttonclick="selectEmpExtraInfo(this)" id="permissionsApplicant" name="permissionsApplicant" property="editor" allowInput="true" showButton = "true"/>

function externalPersonne(value) {
                var grid = nui.get("grid_0");
                        if (value == "1") {
                        mini.get("permissionsApplicant").setAllowInput(false);
}else {
mini.get("permissionsApplicant").setAllowInput(false);
}
是这样版主,我这里版本的好像不支持这个方法一用就这个错"Uncaught TypeError: Cannot read property 'setAllowInput' of undefined",还有其他办法吗?我想根据value的值来改变buttonedit可不可以输入
作者: dforce    时间: 2017-11-27 15:20:53

csq 发表于 2017-11-27 15:15
function externalPersonne(value) {
                var grid = nui.get("grid_0");
                        if (value == "1") {

1 表格内的控件不支持根据id获取
2 事件方法请不要乱加参数
3 如果是nui的问题,请联系普元。




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2