hi i am sending ajax request like below
and added a div like below
{foreach $messages as $message}{/foreach}Message seen 3.16pm{$message['message']}
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
<span>GET</span>
<div><span><span>http://</span><span>pushi.local</span><span>/index.php</span><span>?</span><span><span>dispatch</span><span>=</span><span>vendor_communication.threads</span><span>&</span></span><span><span>thread_id</span><span>=</span><span>34</span><span>&</span></span><span><span>is_ajax</span><span>=</span><span>1</span></span></span></div>