Hello All,
I am using local storage to save data in an app. However, there is a chance it will exceed the maximum allowed size. For this reason, I have implemented a third party compression/decompression algorithm. This is in a .js file.
My problem is that I don't know how to reference the external .js file from the main.js file. For testing purposes, I have copied the third party code, wholesale, into the main.js -- but this is not an ideal situation. I would like to reference the external file so that I can use the relevant functions, and keep the third party code separate.
Can anyone advise?
Thanks,
SGL.
This isn't a Zendesk specific thing. You just need to order your JS files correctly in the html file so that the file you're wanting to call functions from is loaded first. Then the main.js file will be able to use it. Here's a small example, you'll see that the main.js file uses the function from the external.js file.
Hope this helps