Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //index.php after require('globals.php');
- if ($ir['chatban'] == 0)
- {
- echo "<div id='success'></div>
- <iframe src='shoutbox.php?action=view' height='350' width='725' frameborder='0'>Loading... please wait.</iframe><br />
- <form method='post' action='?action=send' id='chatForm' name='chatForm'>
- <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;'>
- </form>";
- ?>
- <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="crossorigin="anonymous"></script>
- <script>
- $(document).ready(function()
- {
- $('#chatSend').click(function()
- {
- $("#chatSend").prop("disabled",true);
- $.post("shoutbox.php?action=send", $("#chatForm").serialize(), function(response)
- {
- $('#success').html(response);
- $("#message").val('');
- $("#chatSend").prop("disabled",false);
- });
- return false;
- });
- });
- </script>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement