EasyUI Forum
November 05, 2025, 08:03:50 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Switchbutton with a textbox disabled [Solved] on: May 10, 2016, 12:26:37 AM
Hi,

As the night give advice, i found that my issue is coming from the html received by onExpandRow that it's used to call the script.

Thank you.

2  General Category / EasyUI for jQuery / Re: Switchbutton with a textbox disabled on: May 09, 2016, 10:24:49 AM
Hi,

Thanks for you answer, yes it working, but when i use it in my code , I have this error :

Code:
TypeError: _4dd is undefined
error source line:
var opts=_4dd.options;

The javascript is generated (PHP scripts) when a row is expanded from a datagrid.
3  General Category / EasyUI for jQuery / Switchbutton with a textbox disabled on: May 09, 2016, 06:27:46 AM
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)
Code:
TypeError: _4dd is undefined
var opts=_4dd.options;

I dont know why i have this error .

When i remove this line
Code:
  $('#13T13').textbox('enable');
, if working for the 'else' part.

I

here the code that i used :

HTML :
Code:
 <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:
Code:
$(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');
                        }
                },
            })
        });
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!