Ok, let me tell you my current scenario, I have a textbox in my page which accepts user input and if the input's length is greater than 5 characters then it will show a button.
Let me show you the code,
<telerik:RadTextBox runat="server" ToolTip="Enter your mobile number" CssClass="form-control" placeholder="mobile"
ID="txtmobile" Width="70%">
<ClientEvents OnKeyPress="openButton" />
</telerik:RadTextBox>
and the function,
function openButton(sender, eventArgs) {
debugger;
var mobileno = sender.get_value() + eventArgs.get_keyCharacter();
if (mobileno.length > 5) { // if length of the entered text is logical
window.$get('<%= btnChkMobile.ClientID%>').style.display = 'block';
}
}
Now, If I debug the problem I am getting expected result i.e button is showing up but If I press "123456" without debugging it does not show the button and after I press "7" i.e "1234567" it showing that button. Why? How to get the expected result?