user1294594
user1294594

Reputation:

javascript code in url if not using $(document).ready

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) {}

Upvotes: 0

Views: 73

Answers (1)

Rob Sedgwick
Rob Sedgwick

Reputation: 5226

Remove the Javascript from the URLs -- it invites cross-site scripting.

Upvotes: 2

Related Questions