Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(function(){
- $('input[type=submit]').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>
- <form action="start.php" method="post">
- //Code
- //ein submit button
- <?php
- if(bedingung){
- //Hier soll dann mein Knopf eingeblendet werden
- 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>';
- }
- ?>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement