next.js
next.js copied to clipboard
Uncaught ReferenceError: ducument is not defined at
@section Scripts{
<script type="text/javascript">
$(ducument).ready(function () {
$("#follow").click(function (e) {
var foll = {};
foll.ID = 222;
foll.FName = "FRANK";
foll.LName = "SANTA";
foll.url = "@Url.Action("Follow", "FarmsCommunity")";
foll.type = "POST";
foll.dataType = "json";
foll.data = JSON.stringify({ usr: foll });
foll.contentType = "application/json";
foll.success = function (response) {
alert("success")
};
foll.error = function (response) {
alert("error");
};
$.ajax(foll);
});
});
</script>
}
My Controller public ActionResult Follow(string userid, User usr) { return Json(new { ResultValue = "Some Value" }); }
Shouldn't it be document not ducument?
This is unrelated to Next.js.