Answer the question
In order to leave comments, you need to log in
When I make an ajax request, I get an Uncaught InternalError: too much recursion error. Why might this be happening?
jquery code:
function follow() {
const followBtn = $('.mypage__follow');
followBtn.click(function () {
$.ajax({
type: 'POST',
url: 'php-scripts/my-pageHandler.php',
dataType: 'html',
data: {
followBtn: followBtn
},
success: function (data) {
alert(data);
}
});
});
}
function follow()
{
if (isset($_POST['followBtn'])) {
echo 'Работает';
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question