Advertisement
Guest User

Untitled

a guest
Jan 8th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <script>
  2. $(function(){
  3. $('input[type=submit]').click(function(){
  4. $.ajax({
  5. type: "POST",
  6. url: "test.php",
  7. data: $("#myform").serialize(),
  8. beforeSend: function(){
  9. $('#result').html("<img src='loading.gif' />")
  10. }
  11. success: function(data){
  12. $('#result').html(data);
  13. }
  14. });
  15. });
  16. })
  17. </script>
  18.  
  19. <form action="start.php" method="post">
  20. //Code
  21. //ein submit button
  22. <?php
  23. if(bedingung){
  24. //Hier soll dann mein Knopf eingeblendet werden
  25. echo '<form action="" method="post" onsubmit="return: false;" id="myform"> <input type="submit" text="load" name="load" value="Load more!"><div id="result"></div></form>';
  26. }
  27. ?>
  28. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement