Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask for mmTextbox
Message
 
To
29/07/2010 08:55:38
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01473906
Message ID:
01474467
Views:
29
>Hi Paul,
>
>>In your mm:mmTextBox markup change class="number" to CssClass="number".
>
>thanks, I had done that. See my last few messages for the problems I am currently experiencing.

A few things, this code:
<script type="text/javascript">
    $("document").ready()
    {
        $(".number").mask("999,999,999.99");  // Masks all element with the class='number'
    }
    </script>
is wrong. The ready() function takes a function as a parameter, it needs to be written this way:
<script type="text/javascript">
   $("document").ready(function() { 
       $(".number").mask("999,999,999.99");  
   });
We're basically passing an anonymous function (a function that doesn't have a name, that's what the function() statement does). Our anonymous function doesn't take any parameters, hence the empty parenthesis in function(). Then the body of the function follows (inside of the curly-braces).

As far as the field being blanked if you don't enter something the entire length, I think that's the behavior of that particular plug-in. I don't see any demos that show entry of currency.

For currency I've used this plug-in before:

http://bendewey.com/code/formatcurrency/demo/
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform