Hi to all.
I would like to have a switchbutton,with when you push on it , it enable a switchbox, and when you uncheck, it disable the textbox.
Code Below...
I try on jsfiddle working fine with 1 switchbox.
But on my complete coden where I have 3 switchbox with 3 textbox , I have this error (all ID are different)
TypeError: _4dd is undefined
var opts=_4dd.options;
I dont know why i have this error .
When i remove this line
$('#13T13').textbox('enable');, if working for the 'else' part.
I
here the code that i used :
HTML :
<td width="50">
<span class="dsR44">
<input class="easyui-switchbutton" name="SOFTWARE_12[value]" id="12I12">
</span>
</td>
<td> <input value='' name="SOFTWARE_13[detail]" id='13T13' class='easyui-textbox' data-options="validType:'length[5,45]',required:'true',disabled:true," style="width:150px"></td>
JAvascript:
$(function(){
var sw=$('#12I12').switchbutton({
required:true,
onText:'Oui',
offText:'Non',
value:'1',
checked:'true',
onChange: function(value){
if (value === true) {
$('#13T13').textbox('enable');
} else {
$('#13T13').textbox('disable');
}
},
})
});