Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function postMultiple(postParam, postUrl) {
- $.ajax({
- type: "POST",
- url: posturl,
- data: postParam,
- dataType: "dataType",
- success: function(response) {
- lastTextMessage = txt_message;
- $('#txt_message').val('');
- $('#BtnSendMsg').show();
- $('#txt_message').focus();
- }
- });
- }
- /**
- *
- * @param {count} 0
- */
- function postTextMultiple(count, chat_id_array, posturl, postParam) {
- if (count >= 1) {
- 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)}`;
- console.log("TCL: sendChatTextMultiple -> NEW formatted param--validate!", param)
- var postUrl = `getChat.asp?chat=${chat_id_array[count]}&last=${lastMessage}&SessionID=${SessionID}`;
- count++;
- postMultiple(postParam, postUrl);
- postTextMultiple(count, chat_id_array, posturl, postParam);
- }
- }
- /*
- *@param count=chat_id_array.length
- */
- function sendChatTextMultiple(chat_id_array) {
- txt_message = $("#txt_message").val();
- if (lastTextMessage == txt_message) {
- $('#BtnSendMsg').show();
- return (0);
- }
- var CheckIT = $("#CheckIT").val();
- postTextMultiple(count, chat_id_array, posturl, postParam)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement