Advertisement
AviEzerzer

Untitled

Aug 21st, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function postMultiple(postParam, postUrl) {
  2.     $.ajax({
  3.         type: "POST",
  4.         url: posturl,
  5.         data: postParam,
  6.         dataType: "dataType",
  7.         success: function(response) {
  8.             lastTextMessage = txt_message;
  9.  
  10.             $('#txt_message').val('');
  11.             $('#BtnSendMsg').show();
  12.             $('#txt_message').focus();
  13.         }
  14.     });
  15. }
  16.  
  17. /**
  18.  *
  19.  * @param {count} 0
  20.  */
  21.  
  22. function postTextMultiple(count, chat_id_array, posturl, postParam) {
  23.  
  24.     if (count >= 1) {
  25.         var param = `message=${encodeURIComponent(txt_message)}&name=${encodeURIComponent(nickname)}&chat=${chat_id_array[count]}&LoginType=${String(LoginType)}&TxtColor=${encodeURIComponent(TxtColor)}&SlctFilter=${encodeURIComponent(SlctFilter)}&TxtImage=${encodeURIComponent(TxtImage)}&CheckIT=${encodeURIComponent(CheckIT)}`;
  26.         console.log("TCL: sendChatTextMultiple -> NEW formatted param--validate!", param)
  27.         var postUrl = `getChat.asp?chat=${chat_id_array[count]}&last=${lastMessage}&SessionID=${SessionID}`;
  28.         count++;
  29.         postMultiple(postParam, postUrl);
  30.         postTextMultiple(count, chat_id_array, posturl, postParam);
  31.     }
  32. }
  33.  
  34. /*
  35.  *@param count=chat_id_array.length
  36.  */
  37. function sendChatTextMultiple(chat_id_array) {
  38.  
  39.     txt_message = $("#txt_message").val();
  40.     if (lastTextMessage == txt_message) {
  41.         $('#BtnSendMsg').show();
  42.         return (0);
  43.     }
  44.  
  45.     var CheckIT = $("#CheckIT").val();
  46.     postTextMultiple(count, chat_id_array, posturl, postParam)
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement