Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging jQuery add-on
Message
 
 
Information générale
Forum:
Javascript
Catégorie:
JQuery
Divers
Thread ID:
01587761
Message ID:
01588104
Vues:
29
>I am trying to incorporate into my project a masked input plug-in (URL: http://digitalbush.com/projects/masked-input-plugin/)
>
>When I add this .js
>
><script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
><script src="Scripts/jquery.maskedinput-1.2.2.min.js" type="text/javascript"></script>
>
>to a separate .aspx file in my project, the mask() function works very well.
>
>But when I add it to a page that uses Master page, I get error:
>
>0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'mask'
>
>
>The test code is identical in separate test page and the page that uses master page:
>
>
> <script type="text/javascript">
>        $(document).ready(function () {
>             $("#txtPhoneNumber").mask("(999) 9999-9999");
>        })
>    </script>
>
>
>The error (above) happens on the line .mask() above.
>
>How would you recommend to debug this situation? TIA

After beating my head against the wall for many hours, I give up on maskedinput.js. It works and then it does not work. And even when it works, it does not work well. For example, I wanted to use it in one textbox where user would be entering time; in hours and decimal. For example, 2.5 (for 2 and half hours). I set up the input mask to 999.99. What happens is that (when it works) if you enter any value of less than 5 digits (e.g. 2.5) the value disappears on leaving the textbox. The only way to make the number stay in the textbox is to enter all 5 digits (e.g. 888.33). I will have to relay on the user to enter the number in the correct format.
Just want to let those who helped me in this thread know.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform