Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. $("#see_comments").click(function() {
  2. $.post(
  3. "comments.php",
  4. {aid: imgnum},
  5. function (data) {
  6.  
  7. }
  8. );
  9. });
  10.  
  11. $("#see_comments").click(function() {
  12. $('<form action="comments.php" method="POST">' +
  13. '<input type="hidden" name="aid" value="' + imgnum + '">' +
  14. '</form>').submit();
  15. });
  16.  
  17. $("#see_comments").click(function () {
  18. $('<form action="comments.php" method="POST"/>')
  19. .append($('<input type="hidden" name="aid" value="' + imgnum + '">'))
  20. .appendTo($(document.body)) //it has to be added somewhere into the <body>
  21. .submit();
  22. });
  23.  
  24. <form id='see_comments_form' action='comments.php' action='POST'>
  25. <input id='see_comments_aid' type='hidden' name='aid' value=''>
  26. </form>
  27.  
  28. $("#see_comments").click(function(){
  29. $('#see_comments_aid').val(imgnum);
  30. $('#see_comments_form').submit();
  31. );
  32.  
  33. $("#see_comments").attr({href: "comments.php?aid='"+imgnum+"'"});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement