Click here to Skip to main content
15,065,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a input button called edit , how can jquey/javascript make my textbox uneditable when press edit , edit button which be changed to save without page refresh and textbox become editable

1 solution

Just disable it. It will make the text non-editable and provide appropriate visual feedback to the user. An important benefit of it is that such behavior is the most expected by the users.

With jQuery:
someElementWrapper = $("#someId");
// ...
someElementWrapper.prop('disabled', true);
// ...
someElementWrapper.prop('disabled', false);
For some more detail, please see:[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900