Jump to content

Using Javascript in a module that calls other files


clong

Recommended Posts

I am attempting to use svg-edit to make a powerful design wizard. I have successfully included the javascript in the head, the javascript runs correctly, however the javascript makes calls to external files. It calls several javascript files. It also calls a png file and an svg file. It's using jQuery Loading $.getScript(), to load scripts, perhaps some other methods as well.

 

These are what my js console looks like, except times 15

 

 
 
If you're wondering, this does not work.
 
$this->context->controller->addJS(($this->_path).'views/svg-edit/extensions/ext-grid.js');
 
It loads the file, but doesn't allow it to be called by the javascript file calling it.

 

Does anyone know how I can get these files to be called by the javascript?

Link to comment
Share on other sites

As I said, all my console errors were some variation on this

 
jquery-1.11.0.min.js:4 GET http://localhost/pre..._=1424807680647 404 (Not Found)
 
I found a place in my javascript file that sets the path that calls these files. I set the path to be absolute, in my case
 
/prestashop/modules/svgwizard/views/svg-edit/path/to/file
 
The module is working, and the only issues left are not prestashop related. I hope I can release this powerful design editor to the community soon. Thank you.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...