does Javascript class still work |
in CI 3.1?
I suspect not. Does anyone have an example of calling a javascript function from CI or a document telling me how to do it?
proof that an old dog can learn new tricks
Implement the functionality in PHP, you can't emulate a browser/run javascript with PHP*.
* You can, but why would you?! https://www.php.net/manual/en/book.v8js.php (12-17-2019, 01:06 AM)jreklund Wrote: Implement the functionality in PHP, you can't emulate a browser/run javascript with PHP*.Well, I was thinking about this last night. I have instructions to have a chrome extension create a message path to my CI program in the Google docs and send messages back and forth. The current issue is that i don't know how to create a message pipe from php to the extension. So now I am thinking I should have a timer in the extension's background task that tries to open a pipe to the CI app every say 5 seconds. If the pipe is successful, then, I will change the extension's icon to a camera. If it is not successful, then the extension will work as it does now. I am using the modified extension as a way to screenscrape a browser tab and store the result to a jpg. I will transfer the jpg up to my server and then to amazon S3, for further processing with a natural language processor, at a later time. What would be even better is to have the extension transfer the jpg directly up to s3, but I don't want to bite off more than I can chew! So, if I do it this way, from the extension (in javascript) to the CI app, it might work. At least I have a chance. But I am also having trouble opening the pipe on my linux client. Worked fine under Windows. I currently get an oauthe2 error. Additionally my server is now running in Docker. Bottom line I am not sure it is possible to create the path in the other direction.
proof that an old dog can learn new tricks
I can't think on any way to communicate with a Chrome Extension (it's not a website with a static IP), it should be the extensions job to contact the real world.
|
Welcome Guest, Not a member yet? Register Sign In |