Mar 04, 2011, 7:11 PM
[CLOSED] Preventing user input
Hi guys,
How can you prevent the user from entering text in a textbox. Can I do so using the javascript code below
How can you prevent the user from entering text in a textbox. Can I do so using the javascript code below
ValidatePasswordLength: function (el) {
var value = el.getValue();
if (value.length == 128) {
el.handled = true;
}
} // End ValidateUsernameLength
<ext:TextField
ID="Username"
runat="server"
FieldLabel= "<%# Html.LabelFor(m => m.Username) %>"
AllowBlank="false"
AnchorHorizontal="100%"
Text = '<%# Model.Username %>'
AutoFocus= "true"
AutoFocusDelay="100"
MinLength= "1"
MaxLength= "50"
EnableKeyEvents="true"
AutoDataBind="true">
<Listeners>
<KeyPress Fn ="doSomething" />
</Listeners>
</ext:TextField>
Last edited by Daniil; Mar 07, 2011 at 1:39 PM.
Reason: [CLOSED]