Welcome Guest, Not a member yet? Register   Sign In
How to pass in a struct to javascript
#6

(06-05-2019, 06:10 AM)hc-innov Wrote: Sorry I made a mistake in my code.
Replace with:

Code:
chrome.runtime.sendMessage(editorExtensionId, <?php echo '"'.$command.'"'; ?>,

Don't use jsonencode in your controller

The thing is that I  need to send more than just the 'command' string. I have the struct named $data which has both a "command" string and a "message" string.  So that is why I tried $data.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: How to pass in a struct to javascript - by richb201 - 06-05-2019, 06:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB