hi i am sending ajax request like below
<a class="cm-ajax" href="index.php?dispatch=vendor_communication.threads&thread_id={$thread['thread_id']}&result_ids=chat_area_div">
and added a div like below
<div class="chat-area" id="chat_area_div"> {foreach $messages as $message} <div class="chat-area-main"> <div class="chat-msg"> <div class="chat-msg-profile"> <img class="chat-msg-img" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3364143/download+%2812%29.png" alt="" /> <div class="chat-msg-date">Message seen 3.16pm</div> </div> <div class="chat-msg-content"> <div class="chat-msg-text">{$message['message']}</div> </div> </div> {/foreach} <!--chat_area_div--></div>
here is the controller code
if ($mode == 'threads') { if (isset($_REQUEST['thread_id']) && isset($_REQUEST['is_ajax'])){ $thread_id = $_REQUEST['thread_id']; $params = [ 'user_id' => $auth['user_id'], 'thread_id' => (int) $thread_id, ]; $messages = fn_vendor_communication_get_thread_messages($params); // return $messages; Tygh::$app['ajax']->assign('messages', $messages); exit; } }
The issue is that i am getting the response nothing is being displayed in the results_ids div.
and also results_id variable is not being sent with the ajax request url it is like
GET