Misplaced return false;
. It should be at the end of .submit()
function. So move it one line upwards:
$(document).ready(function () {
$("#test").submit(function (event) {
$.ajax({
type: "POST",
url: "/edit_favorites/",
data: {
'video': $('#test').val() // from form
},
success: function () {
$('#message').html("<h2>Contact Form Submitted!</h2>")
}
});
return false; //<---- move it here
});
});
UPDATE:
About the issue POST /edit_favorites/ HTTP/1.1" 403 2294
. Check on this post which looks similar to your issue: