When I load the page with Chrome I see that jquery is loaded (one time); then maskedinput.js is loaded (one time). But then I see MsAjaxJs loaded (below is the copy of the line):
http://localhost:52714/bundles/MsAjaxJs?v=J4joXQqg80Lks57qbGfUAfRLic3bXKGafmR6wE4CFtc1
But I don't have anywhere in my code loading the MsAjax (in case it conflicts with maskedinput.js).
As to possible problem with maskedinput.js, everything is possible. Although, as I said in the initial message, it works in one test page.
And since ASP.NET does not allow me to set up masks otherwise, I need something.
Thank you.
>If a page tries to load jQuery twice, it will fail to run without a warning. So, make sure that jQuery is specified in the Master page, but not in the specific page you need.
>
>The same thing may happen if maskedinput is specified twice.
>
>One other thing. I tried using that same jquery library but it would blank out the field and the value once you tab out of it. In my search for another library, I found several forum posts indicating that masked input is very problematic and several people just gave up.
>
>
>>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
"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