start_video.tpl 570 B

1234567891011121314151617181920
  1. {{ form }}
  2. <script>
  3. $('form[name="start_video_chat"]').on('submit', function(e) {
  4. e.preventDefault();
  5. var createChatRoom = $.post(
  6. '{{ _p.web_ajax }}chat.ajax.php',
  7. {
  8. room_name: $(this).find('input[name="chat_room_name"]').val(),
  9. to: $(this).find('input[name="to"]').val(),
  10. action: 'create_room'
  11. }
  12. );
  13. $.when(createChatRoom).done(function(response) {
  14. $('#global-modal').find('.modal-body').html(response);
  15. });
  16. });
  17. </script>