two views with javascript. One works, one doesn't. Why? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: two views with javascript. One works, one doesn't. Why? (/showthread.php?tid=73687) |
two views with javascript. One works, one doesn't. Why? - richb201 - 05-22-2019 I am using javascript to create 2 messages that I am sending from my CI program to my Chrome Extension. This is the first one that seems to run fine. I am calling it from a method in one of my controllers. The message snapshot_mode is correctly sent to the Chrome Extension. Code: <script language="javascript"> Later, when the user logs off the application I am calling this from a different function in the same controller: Code: <script language="javascript"> RE: two views with javascript. One works, one doesn't. Why? - InsiteFX - 05-22-2019 Have you tried using your browsers development tools F12 ? Bring up the developer tools in the console tab and watch what the javascript is doing etc; RE: two views with javascript. One works, one doesn't. Why? - richb201 - 05-22-2019 Ill try that. It is funny that the one with the .ready works but the "naked" one doesn't. |