I added a function to an existing .js file (I tried two different files) in order to make the method accessible in multiple locations without having to repeat the code. I also created a simple function just to confirm that my function wasn't causing any issues.
function doNothing() {
alert("Dammit.");
}
Although I can see the method in the intellisense list in my .ascx control, as soon as I try to step into it, it fails to work properly.
Below is how I attempted to reference the file, and while it appears to recognize the methods, they still don't work:
<script src="/javascript/messages.js" language="javascript" type="text/javascript"></script>
Any thoughts on what could be going wrong? Any common errors I might be overlooking? It seems like everything should be functioning correctly.
Note: When the methods are located inside the .ascx file, they work fine even if there are missing semi-colons.