Jump to content


Member Since 24 Dec 2015
Offline Last Active Jul 20 2019 11:07 PM

#149252 Ooooops, something went wrong! If you can see this message, this is proba...

Posted harshalone on 13 July 2019 - 02:29 PM



Step 1:


Make sure in your view you have file iterated via a loop like this

<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php foreach($output->css_files as $file): ?>
        <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
    <?php endforeach; ?>
        <div style="padding: 20px 10px;">
            <?php print_r($output->output); ?>
        <?php foreach($output->js_files as $file): ?>
            <script src="<?php echo $file; ?>"></script>
        <?php endforeach; ?>





Step 2: please include this before output


if (isset($data->output ->isJSONResponse) && $data->output->isJSONResponse) {
            header('Content-Type: application/json; charset=utf-8');
            echo $data->output->output;