Validating input Integer no only using Regex

No.of Views877
Bookmarked0 times
Downloads 
Votes0
By  Kirti.M.Darji   On  15 Feb 2010 22:02:03
Tag : General , How to
Validating input Integer no only using Regex
emailbookmarkadd comments print

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Following Function in Page Source Script Part

like

function intOnly(i) { if(i.value.length>0) {i.value = i.value.replace(/[^\d]+/g, ''); } }

set following property for Textbox like

onChange="intOnly(this);"onkeypress="intOnly(this);" onkeyup="intOnly(this);"

Thank you


About the Author


Kirti Darji
P.G.D.C.A, M.SC(Computer Science) 3+ YEAR EXPERIENCE Visual C#.net and VB.net Windows and Web base Application

Expertise :C#.net, VB.Net,ASP.net,SQL Server, MS Access,aJAX, JavaScript,CSS,HTML,XML,N TIRE ARCHITECTURE,oOPS,Web Services,Core Ajax,visual Source safe,IIS

Occupation :SR. Software Developer
Company : MADHUVAN INFO TECH PVT.LTD
Location :AHMADABAD


 
Sign Up to vote for this article
 
About Author
 
Kirti.M.Darji
Occupation-Software Engineer
Company-Maven-Infosoft Pvt.Ltd
Member Type-Expert
Location-Not Provided
Joined date-03 Jun 2009
Home Page-
Blog Page-http://kirtimdarji.blogspot.com/
I am Kirti M. Darji Senior Software Developer Having 3.5 Years Experience In Microsoft .Net(c#) Technologies.
 
 
Other popularSectionarticles
    As Organizations grow, not only its constituents grow, but also it’s Data, which grows enormously, along with it. It is true that keeping the control and Integrity of huge data is a big challenge for an Organization, however there is an effective and organized way to manage it, by means of ”Data Governance”.
    Published Date : 28/May/2010
    Basics of Bing Search API using .NET
    Published Date : 16/Feb/2010
    Indian Rupee symbol has been launched but we still use rupee or INR. Because we don’t have current rupees symbol in our keyboard so what? Should we have to wait for that? The answer is NO, we are the developers and we can’t wait at all. So here I am showing you how to create Rupee symbol to include it in system char map.
    Published Date : 30/Aug/2010
    In this article, i have given list of SMTP error code and descriptions which is occurring in SMTP.
    Published Date : 15/Feb/2010
Comments
By:Geez, this is awful.Date Of Posted:2/15/2012 2:15:54 AM
What?
wow. this is just....bad.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top