![]() |
Flashdata with Sweetalert2 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Flashdata with Sweetalert2 (/showthread.php?tid=68847) |
Flashdata with Sweetalert2 - googlemy - 09-03-2017 Hi All, I have problem when I try to combine flashdata with Sweetalert2, Controller : PHP Code: public function social_settings_pro() View : PHP Code: <?php if ($this->session->flashdata('globalmsg')): ?> I get error like below, Code: Uncaught TypeError: Cannot read property 'querySelector' of null RE: Flashdata with Sweetalert2 - php_rocs - 09-04-2017 @googlemy, why don't you determine if the flashdata variable exist in the social_settings controller and based on that send it into the view as a variable? This way you can set the variable to a value or false. RE: Flashdata with Sweetalert2 - Waschi - 09-04-2017 @googlemy You are sure that the Sweetalert is working correctly? For me the Codeigniter Code looks correct. Maybe first Test with: Code: <script type="text/javascript"> |