If you want your button to call the routine you have written in filename.js you have to edit filename.js so that the code you want to run is the body of a function.
For you can call a function, not a source file. (A source file has no entry point)
If the current content of your filename.js is:
you have to change it to:
function functionName(){
alert('Hello world');
}
Then you have to load filename.js in the header of your html page by the line:
<head>
<script type="text/javascript" src="Public/Scripts/filename.js"></script>
</head>
so that you can call the function contained in filename.js by your button:
<button onclick="functionName()">Call the function</button>
I have made a little working example.
A simple HTML page asks the user to input her name, and when she clicks the button, the function inside Public/Scripts/filename.js is called passing the inserted string as a parameter so that a popup says "Hello, <insertedName>!".
Here is the calling HTML page:
<html>
<head>
<script type="text/javascript" src="Public/Scripts/filename.js"></script>
</head>
<body>
What's your name? <input id="insertedName" />
<button onclick="functionName(insertedName.value)">Say hello</button>
</body>
</html>
And here is Public/Scripts/filename.js
function functionName( s ){
alert('Hello, ' + s + '!');
}