I have a check box which is the basis if the input box is disabled when click
of the event I can use it correctly but when I get it in the database it does not behave correctly, but I am getting the value which I hope. For example this value is 0
, it must be displayed incorrectly and disabled is false (default) when value 1
will disable this truth, but the input is not disabled here Click
> $ ('# flag') on the program. (Function () {console.log ("click on change sumenu") ($ (if). ($: "Check")) {$ ('# url') .prop ('disabled', true); Console.log ("uncheck the truth");} and {$ ('# Url') .pop ('disabled', false); console.log ("nocheck disble false");}});
The code which is getting the code from the success of Ajax and should turn on / off input on data load
if (data [i] .flag == "0") {console.log ("value is 0 a check is not incorrect"); $ ('# Flag'). Prop ('check', wrong); $ ('# Url'). Prop ('disabled', false); } Else {console.log ("value1 check is incorrect"); $ ('# Flag'). Prop ('check' is true); $ ('# Url'). Prop ('disabled', true); }
There is a syntax error in your code,
this Should be, $ ('# url'). Prop ('disabled', true);
No, $ ('# url'). 'Inactive', correct);
No comments:
Post a Comment