the read only property is not able to disable using jquery -


this question has answer here:

in jquery

according condition make 1 field read below code

$("#name").attr("readonly", true); 

it working fine

but when try disable using below codes

$("#name").attr("readonly", false);            or $("#name").attr("disabled", false); 

it not getting disabled. how can achieve it

the value of disabled attribute not matter. if in attribute list, element disabled regardless of whether false or true or empty. need remove attribute enable back.

use $("#name").removeattr('disabled') re-enable element.


Comments

Popular posts from this blog

Android : Making Listview full screen -

jsf - How to order SelectItems in custom renderer extending MyFaces HtmlMenuRenderer -

c# - How to share session between a MVC project and a WCF project? -