Welcome Guest, Not a member yet? Register   Sign In
running chrome.runtime.sendMessage
#1
Smile 

Huh I have a need to run some javascript from my CI app. This is what I need to run:
Code:
// The ID of the extension we want to talk to.
var editorExtensionId = "abcdefghijklmnoabcdefhijklmnoabc";

// Make a simple request:
chrome.runtime.sendMessage(editorExtensionId, {openUrlInEditor: url},
 function(response) {
   if (!response.success)
     handleError(url);
 });
This is basically what I need to send a message from my CI app to my Chrome Extension and came from the Chrome developers forum. I know the Id of my extension. I am not sure what is meant by : {openUrlInEditor: url}, but I assume that is the message I want to send? In my case I probably will send a "jsonized" buffer. 

But how do I get the above code to run when a Grocery crud callback is triggered? 
proof that an old dog can learn new tricks
Reply
#2

(This post was last modified: 01-19-2019, 02:24 PM by ciadmin.)

CodeIgniter runs server-side, and what you are describing is client-side, and sounds like something that would be added to your Grocery crud JS callback handling.
Reply
#3

I was aware that it is client side. I figured there must be some way to get the javascript embedded into the html page that CI/GC is creating and associating that with the button that I created in GC.
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB