I have an external JavaScript in my HTML page. Is there a way to disable linking to or viewing this js file?
No, there is not a way to do this. It's a client-side scripted language...you cannot in any way hide the a script that's running...not from the people you are probably wanting to hide it from (people who would go after your script are smarter than the average user most likely).
There are a number of tools available to inspect javascript, Chrome's tools, Firebug, any traffic sniffer, javascript unpackers (though debate-ably packing/minifying makes the code less "out of the box" usable).
You can deter people with the packing/minification, but you cannot prevent them from seeing/figuring out the code.
No, you cannot. If the browser is executing it, users can find a way to view it.
You might consider a Javascript minifier/obfuscator, like YUI Compressor, to make the reverse-engineer's job harder.
Nick Craver is correct (vote it), never the less, usually when having such problems with protected code, I use php to do some of it, this way the JavaScript file will be available, but not "human-readable" since it doesn't do all the necessary work...
Just a tip, despite I'm much more a share share king of guy!