skip to Main Content

Why is jquery post sending empty data?

<!DOCTYPE html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <head> </head> <body> <div id="all-comments"></div> <input type="hidden" name="page_id" value="1"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function() { let page_id = $('input[name="page_id"]').val(); $.ajax({ url: 'vender/show_comment.php', type: 'POST', data: { page_id: page_id } }); setTimeout(function() { $("#all-comments").load("vender/show_comment.php") },…

VIEW QUESTION
Back To Top
Search