How do i allow Tab on the controls and allowing only numeric values in Textboxes uing javascript ?

Posted by Mahe under JavaScript on 4/4/2013 | Points: 10 | Views : 1401 | Status : [Member] | Replies : 1
Hi All,


How do i allow Tab on the controls and allowing only numeric values in Textboxes uing javascript ?

Regards,
Mahe




Responses

Posted by: Jayakumars on: 4/4/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
function fncInputNumericValuesOnly()
{
if(!(event.keyCode>=48||event.keyCode<=57))
{
event.returnValue=false;
}
}

<asp:TextBox ID="txtAccountNumber" runat="server" CssClass="insideformtext" TabIndex="23"
Width="150px" onkeypress="fncInputNumericValuesOnly()"></asp:TextBox>
http://forums.asp.net/t/1564004.aspx


Mark as Answer if its helpful to you

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response