Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="../controller/SendChatMessage.class.php?act=open_chat&id_unique_talk=<?=$get_id_unique_talk?>&to_id=<?=$get_id_para?>" id="send_message_chat" ajax="true">
- <div class="col-sm-10">
- <div class="message-area">
- <textarea placeholder="Message" rows="10" name="message" id="txt_message"></textarea>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(e) {
- $("form[ajax=true]").submit(function(e) {
- e.preventDefault();
- var form_data = $(this).serialize();
- var form_url = $(this).attr("action");
- var form_method = $(this).attr("method").toUpperCase();
- $("#loading").show();
- $.ajax({
- url: form_url,
- type: form_method,
- data: form_data,
- cache: false,
- success: function(returnhtml){
- $("#result").html(returnhtml);
- $("#loading").hide();
- document.getElementById('txt_message').value='';
- }
- });
- });
Add Comment
Please, Sign In to add comment