javascript code in url if not using $(document).ready
<p>If I don't wrap my javascript in $(document).ready, any page that the javascript file is included in will cause a http 400 response (bad request). The url has the javascript code appended to the end for some reason... I am using asp.net mvc. Any ideas?</p>

<p>This causes the error:</p>

<pre><code>var location = function (vm, data) {}
</code></pre>
