Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask for mmTextbox
Message
From
29/07/2010 08:15:14
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01473906
Message ID:
01474428
Views:
28
>If you use Firebug, you should be able to step through your javascript just like you do in Visual Studio. You can put a breakpoint on the line where you set the mask to make sure it's getting called, inside of the $(document).ready() {}
>
>We're gonna get this working for you!
>
>Eric

Morning Eric,

I really appreciate your assistance with this!

I got a bit closer last night. I found an example last night which actually showed the entire code in one file rather than in little bits which don't explain how they fit together properly. So I used this example and got that to work. I then adjusted my Master page to use very similar code and now the mask is applied when the textbox has focus, I can enter only numbers in there, but when I leave the textbox, what I've entered disappears!

This is my code:
    <script src="js/jquery.js" type="text/javascript"></script>

    <script src="js/jquery.maskedinput.js" type="text/javascript"></script>
   
    <script type="text/javascript">
        jQuery(function($) {
            $(".number").mask("999,999,999.99");
            $("#date").mask("99/99/9999", { placeholder: " " });
            $("#ssn").mask("999-99-9999", { completed: function() {
                alert("You typed the following: " + this.val());
            } 
            });
        })

     </script>
< later >

Changing the code to this does not work:
    <script type="text/javascript">
        $("document").ready() 
            {
                $(".number").mask("999,999,999.99");
            }

     </script>
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform