My question is i am making a textbox readonly during the page load and i have edit button . when they click the edit button i have to make it editable i.e make readonly=false using javascript. Note : I have to use readonly property not disabled because disabling is making the content not readable look wise and also i have to readonly=true/editable using javascript.It is mandatory because the control is in a dialog and i dont want a postback.I tried the following code.It is throwing error.readonly object is not defined.
<input type="button" id="hypJobDetailEdit" value="EDIT" id="btnedit" class="outlook-button" style="width: 85px" />
<asp:TextBox ID="txtrequestedby" runat="server" Width="150px" ReadOnly="true" />
javascript
<script>
$(document).on("click", "[id*=hypJobDetailEdit]", function () {
document.getElementById("MC_txtrequestedby").readOnly = false;
});
</script>