Hi,
Can we use third party Javascript library (e.g. jquery-3.2.0.min.js
, jquery.xml2json.js etc.)
in thingworx ? If yes what how to do it ?
If no what is the recommended way to get the those library functions in TW ?
Best Regards,
Aniruddha
Hello, I found another thread in community talking about "How can I reference my js libraries in custom extension widget", that introduced custom js file into widgets, so that might also give you ideas in how to import your 3rd party library.
Here's the link for the thread https://community.thingworx.com/thread/39606?&posno=20&q=import%20library&ProductFamily=ThingWorx&source=search
And if that could help, please keep me notified, thanks!
Hi
I want to use custom Javascript file (e.g. my.js) containing utility functions, in 'Snippet' TAB of Thing.services()
How to do it ?
Regards,
Aniruddha
Hi,
Remember that the "Scripts" in services or subscriptions are not for client side actions, but for server side actions. We are using "Javascript" syntax and implementation methods, but it's not a real Javascript language for web browsers. If you want to add any snippets or resources in the list of snippets, you need to develop an extension by using "Extension SDK" and create a new JAVA (not Javascript) class for a resource and import into ThingWorx.
Regards,
Daniel
Got it. That Helps !