Announcement

Collapse
No announcement yet.

Simple extension

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple extension

    I would like to create a simple extension where I can put some simple javascript code that will run on page load.

    How to create the folder structure for it?

    I currently put my file here:
    files/client/modules/mymodulename/lib/mylib.js

    And configured here to load it up:
    files/application/Espo/Modules/mymodulename/Resources/metadata/app/jsLibs.json

    mylib.js contains only this just to test it out:

    (function () {
    alert("hello");
    })();

    And the jsLibs.json contains this:
    {
    "mymodulename": {
    "path": "client/modules/mymodulename/lib/mylib.js",
    "exportsTo": "$",
    "exportsAs": "mymodulename"
    }
    }

    It is not working. is there any way to make this work so the page will alert upon load?

    TN
Working...
X