Welcome Guest, Not a member yet? Register   Sign In
javascript is being called twice

(This post was last modified: 05-21-2019, 07:10 AM by richb201.)

I got it going and I am posting this for the next guy trying to use .js with ci.

I created a view that has:

script language="javascript">

   $(document).ready( function() {
       var editorExtensionId = "lamacgnkfoiknjpleghfknxxxbmhdaei";

       // Make a simple request:
       chrome.runtime.sendMessage(editorExtensionId, "snapshot_modeb",
           function (response) {
               if (!response.success)



I am calling it in my controller when I display the first page. Here is what I use to call it:

$data = array(
               'command' => 'My Title',
               'userid' => 'My Heading',
               'campaign' => 'My Message',
               'param_1' => 'My Title'


           $this->load->view("javascript_funcs_extensionloaded", $data);

The view has a .php extension. I haven't gotten the data passing working yet, but that is next. I my case I am passing the message to an extension also running in the same copy of Chrome.
proof that an old dog can learn new tricks

Messages In This Thread
javascript is being called twice - by richb201 - 05-18-2019, 01:40 PM
RE: javascript is being called twice - by richb201 - 05-21-2019, 07:08 AM

Theme © iAndrew 2016 - Forum software by © MyBB