Ajax Call

hi i am sending ajax request like below

and added a div like below

{foreach $messages as $message}
Message seen 3.16pm

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);


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



i changed the ajax request according to documentation added


instead of adding result ids in the url but still its not working

Since you use the exit function, you should show some content before exit. E.g.


@mohsin1631 Did you end up ever figuring this out? I have been struggling with trying to use Ajax/cm-submit with a checkbox to reload a div on the same page, without reloading the entire page. The documentation for CS-Cart is generally okay but the examples just aren't there and the few examples of CS-Cart handling things in a similar way in the original code base are irrelevant.