Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. //index.php after require('globals.php');
  2. if ($ir['chatban'] == 0)
  3. {
  4.     echo "<div id='success'></div>
  5.     <iframe src='shoutbox.php?action=view' height='350' width='725' frameborder='0'>Loading... please wait.</iframe><br />
  6.     <form method='post' action='?action=send' id='chatForm' name='chatForm'>
  7.         <input type='text' required='1' name='message' id='message' placeholder='Write a message here' style='width: 650px; height: 30px;'><input type='submit' id='chatSend' value='Send Message' style='height: 30px;'>
  8.     </form>";
  9.     ?>
  10.         <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="crossorigin="anonymous"></script>
  11.         <script>
  12.             $(document).ready(function()
  13.             {
  14.                 $('#chatSend').click(function()
  15.                 {
  16.                     $("#chatSend").prop("disabled",true);
  17.                     $.post("shoutbox.php?action=send", $("#chatForm").serialize(),  function(response)
  18.                     {  
  19.                          $('#success').html(response);
  20.                          $("#message").val('');
  21.                          $("#chatSend").prop("disabled",false);
  22.                     });
  23.                     return false;
  24.                 });
  25.             });
  26.         </script>
  27.     <?php
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement