Click here to Skip to main content
15,878,809 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
i want my textbox can allow 99.00 or 999.00

so what i did is
JavaScript
$("#<%= mytxtbox.ClientID%>").mask("999.99");
$("#<%= mytxtbox.ClientID%>").mask("99.99");


i want my textbox should allow both of this format.
any solutions?
Posted

Hi,

Please take up a look at this.

Jquery Mask in Detail[^]

I beleive, that only one mask can be assigned to a single control.

I am trying few samples, will update once I get any clues.

If you are fine use Ajax Tool Kit.

Ajax Tool Kit - Masking[^]

Thanks!
 
Share this answer
 
v2
Using too masks at the same time makes no sense, right? And changing the mask depending on some condition is not a problem. Use either one line of your code or another. That's all.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900