Rounding of digits and restricting character on a Text box

Posted by Punny under jQuery on 12/4/2013 | Points: 10 | Views : 6118 | Status : [Member] | Replies : 2
Dear Friends,

Could you please help me in achieving the below using Jquery

1) When a user enter the number with decimal places and leading zeroes the following should happen on save

The Leading Zeroes should be removed and a comma separator should appear automatically.

The after decimal places should always be two digits

E.g: 002398.456 = 2,398.46 AND

2) Input is restricted to 2 digits (for years) plus 2 digits (for months).

On display, to be rounded off to nearest 2 digits.

E.g:10.6(means 10 years 6 months) becomes 11.

3) Any input;On display, maximum 50 characters followed by 3 dots.

i.e. If a user enters 100 or 200 characters, the display should always be 50 characters followed by 3 dots.

Thank you all a lot in advance.



Posted by: vishalneeraj-24503 on: 12/5/2013 [Member] [MVP] Platinum | Points: 25

Please look into below URLs:-

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

Login to post response