C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

How to make numeric textbox


Posted Date: 30 Oct 2009      Posted By: Nazia Suman      Member Level: Silver     Points: 1   Responses: 3



Hi all..

Can anyone suggest me to make numeric textbox using javascript that accepts numeric values and also the special characters like (. , - +)...

and how to resize the textbox as per the value given in database table..

For ex,

I can have the table named sample. It contains the fields like sno varchar(5),name varchar(100) and average numeric(5,2). Here how can i make the average textbox to accept 5 digits and 2 decimals.. ie(12345.00)

Thanks & Regards,
Nazia









Responses

Author: Nikhil Gaur    30 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

there is no need to use javascript procedure you can use regular expression validator. and set a regular expression for you requirement.

Join this campus group
http://www.dotnetspider.com/sites/637/-ecb-aspdotnet.aspx

Thanks & Regards
NIks
My Software and Web Development Experience



Author: Shawpnendu bikash maloroy    04 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

You can read the below link. Where you can use signed,unsigned or float whatever you want to meet the client requirement:

http://shawpnendu.blogspot.com/2009/03/cross-browser-javascript-isnumeric.html



Author: lakshya    05 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

create an event keyup in javascript and pass eas paramter in fucntion and check e.value range using ascii

Happy dotneting Spread Smiles :-)
Visit Lakshya



Post Reply
You must Sign In to post a response.
Next : How to enter only numeric values in textbox
Previous : How to asign href (anchor tag) in java script in a loop.
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use