Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
I've this:

HTML
<script type="text/javascript" src='<%=ResolveUrl("~/Scripts/jquery.maskedinput-1.3.1.js")%>'></script>


When navigate to a page that call some script function, a runtime error message says:
HTML
0x800A01B6 - JavaScript Runtime Error : The Object : does not support property or method "mask".


There is any way to reference javascript files in relative path from masterpage and let me use it functions with all project's pages?

I'm using webforms, nor razor or MVC.

Thank you!
Posted
Comments
Kornfeld Eliyahu Peter 20-Oct-14 14:58pm    
Where there that line of script is in the mater page?
Luis Oliveira 1966 21-Oct-14 18:33pm    
The script tag is inside head tag.
Laiju k 20-Oct-14 23:49pm    
where have you put the script.you have to place the script inside body tag
Luis Oliveira 1966 21-Oct-14 18:33pm    
The script tag is inside head tag.
Kornfeld Eliyahu Peter 22-Oct-14 2:24am    
Good place...
Can it be that URL does not resolve correctly because of the placement of the master page inside the project (other folder than the page)?
The best you can do is using the debugger of the browser to check what the actual URL is and see why id doesn't load...

1 solution

I've made a change replacing ResolveUrl by Page.ResolveClientUrl on master page and it seems to be working fine now. But I really have no idea about why...
 
Share this answer
 
Comments
Kornfeld Eliyahu Peter 22-Oct-14 2:25am    
See my comment on your question...

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