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?
This causes the error:
var location = function (vm, data) {}
Remove the Javascript from the URLs — it invites cross-site scripting.