Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(function(){
- $('#submitlink').click(function(){
- $.ajax({
- type: "POST",
- url: "test.php",
- data: $("#myform").serialize(),
- beforeSend: function(){
- $('#result').html("<img src='loading.gif' />")
- }
- success: function(data){
- $('#result').html(data);
- }
- });
- });
- })
- </script>
- <?php
- if(bedingung){
- //Hier soll dann mein Knopf eingeblendet werden
- echo '<form action="" method="post" onsubmit="return: false;" id="myform"> <a href="#" id="submitlink">Load more!</a><div id="result"></div></form>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement