Welcome Guest, Not a member yet? Register   Sign In
trying to call javascript
#10

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

I changed the call in my controller to:

         $this->load->js("/js/javascript_funcs_extensionloaded.js");
         echo '<script type="text/javascript" > register_extension(); </script>';

I just can't tell if it is running. I put a breakpoint in my js register_extension module, but phpStorm is not stopping there. I think  my xdebug is set correctly. It seems that I don't know how to declare a javascript function in my php program. I found this is the documentation re:Javascript Class

"This library is DEPRECATED and should not be used. It has always been with an ‘experimental’ status and is now no longer supported. Currently only kept for backwards compatibility."

OK, so it was taken out Undecided.  But what do the rest of us do now?

I am getting these errors in my console:

index:1

Uncaught ReferenceError: register_extension is not defined

javascript_funcs.js:1

Uncaught ReferenceError: $ is not defined


Uncaught SyntaxError: Unexpected token var

index

Here is the javascript

$(register_extension(
   var editorExtensionId = "lamacgnkfoiknjpleghfknfigbmhdaei";

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

})

)

There seems to be something BIG I am missing here? It would seem that I would need to tell the PHP program that register_extension() is a valid javascript function? 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
trying to call javascript - by richb201 - 05-07-2019, 03:05 PM
RE: trying to call javascript - by php_rocs - 05-07-2019, 07:03 PM
RE: trying to call javascript - by richb201 - 05-07-2019, 10:37 PM
RE: trying to call javascript - by richb201 - 05-08-2019, 05:34 AM
RE: trying to call javascript - by InsiteFX - 05-08-2019, 08:33 AM
RE: trying to call javascript - by richb201 - 05-09-2019, 09:32 AM
RE: trying to call javascript - by InsiteFX - 05-09-2019, 02:28 PM
RE: trying to call javascript - by richb201 - 05-09-2019, 04:11 PM
RE: trying to call javascript - by InsiteFX - 05-10-2019, 03:31 AM
RE: trying to call javascript - by richb201 - 05-10-2019, 06:04 AM
RE: trying to call javascript - by includebeer - 05-10-2019, 11:02 AM
RE: trying to call javascript - by richb201 - 05-10-2019, 03:56 PM
RE: trying to call javascript - by InsiteFX - 05-10-2019, 08:23 AM
RE: trying to call javascript - by Wouter60 - 05-10-2019, 10:46 AM
RE: trying to call javascript - by includebeer - 05-11-2019, 05:49 AM
RE: trying to call javascript - by InsiteFX - 05-11-2019, 08:18 AM
RE: trying to call javascript - by includebeer - 05-11-2019, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB