Javascript : Textbox Disable
-
Trying to disable a textbox using a Javascript function. The application page does not have the
element. Will not be able to use, document.form.element None of these work!! document.getElementById('<%=Textbox1.ClientID%>').enabled=false} document.getElementById("physicalAddr1TextBox").enabled=false} document.getclientElementID("physicalAddr1TextBox").enabled= false; Please help
Thanks
-
Trying to disable a textbox using a Javascript function. The application page does not have the
element. Will not be able to use, document.form.element None of these work!! document.getElementById('<%=Textbox1.ClientID%>').enabled=false} document.getElementById("physicalAddr1TextBox").enabled=false} document.getclientElementID("physicalAddr1TextBox").enabled= false; Please help
Thanks
-
No wonder. An html element doesn't have any
enabled
property.document.getElementById('<%=Textbox1.ClientID%>').disabled = true;
--- single minded; short sighted; long gone;
-
No wonder. An html element doesn't have any
enabled
property.document.getElementById('<%=Textbox1.ClientID%>').disabled = true;
--- single minded; short sighted; long gone;
-
Can you help me with this one? In code behind, there is the borderstyle property. TextBox.BorderStyle = BorderStyle.NotSet; How can I write this in javascript using document.getElementById?
Thanks
hello, you could change the css class for the textbox: document.getElementById(textboxid).className ='thecssclass'; and write the thecssclass with any styles you want. Hope it helps!
Just Relax And Keep It Simple.