cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Using JS library in TW

avaidya1
1-Newbie

Using JS library in TW

Hi,

Can we use third party Javascript library (e.g. jquery-3.2.0.min.jsjquery.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

4 REPLIES 4

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

dmoon
5-Regular Member
(To:avaidya1)

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 !

Top Tags