EasyUI Forum
November 06, 2025, 01:59:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Dynamically disable field.  (Read 11369 times)
amabanal
Newbie
*
Posts: 2


View Profile Email
« on: November 16, 2014, 06:42:09 PM »

I can't seem to find a way to dynamically enable or disable the field. since textbox are replaced by easyui fields then hide the original textbox. If you guys have any sample or something that can disable textbox based on the original setting kindly post here. Thanks

new in Web
-Mike
Powerbuilder Programmer.



-edit

Forgot to mention that this is triggered onLoad event.

<td><input name="del_by" class="f1 easyui-textbox" id="allFields"></input></td>

This will work if i will not use the easyui class.
« Last Edit: November 16, 2014, 07:18:44 PM by amabanal » Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: November 16, 2014, 07:03:45 PM »

You can call 'disable' or 'enable' methods to disable or enable a textbox component.
Code:
$('#tt').textbox('disable');  // disable it
$('#tt').textbox('enable');  // enable it
Logged
amabanal
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: November 16, 2014, 07:09:45 PM »

Sorry Sir, but that will not work, because like i said the original textbox is hidden and the one that is currently in display is the one that easyui created. I forgot to mention that this is triggered on load.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #3 on: November 16, 2014, 11:34:17 PM »

If you want to disable a textbox when initializing it, simply set the 'disabled' property to true.
Code:
<input name="del_by" class="f1 easyui-textbox" id="allFields" disabled></input>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!