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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Does anyone knows how to add cutomized Javascript code on Mashup?

dsun
1-Newbie

Does anyone knows how to add cutomized Javascript code on Mashup?

I want to use my javascript code on mashup to control widget behavior or displaying style. As I know the widget name, can I control the widget by JS as what I did in normal HTML progamming? If yes, how can we do it(Any docment guide)?

And also, is there a way to view what kind of code(maybe HTML, JSP...) the Mashup was translated into?

4 REPLIES 4
paic
1-Newbie
(To:dsun)

Please look into using the standard tools provided before taking this step.

Already there is the ability to do the following:

1. State Based defintions

2. Visibility of Widgets

3. Swapping of contained mashups

with those three abilities, you should be able to cover a host of scenarios, perhaps if you post a description of what you are looking to do, people might be able to share how they do it with standard Thingworx widgets, before exploring customization..

dsun
1-Newbie
(To:paic)

Thank you Pai for the quick response. Our Widget and Mashup can do all the things I asked. Customer want to know if there is a way to add there own JS code to mashup. I think the answer is no, but not fure for that. Want confirm with you if it possible to use their own JS in mashup?

paic
1-Newbie
(To:dsun)

They can leverage the Expression widget, they can also create their own custom widgets.

Mostly though client side we focus on visualization and the model drives the logic and behavior so generally that code is Server side, so those links are generated Server side and then passed back to the client side, instead of trying to generate those with JS client side.

Not sure if these are the same use cases.

dsun
1-Newbie
(To:paic)

Thanks Pai. I got your point. They are using traditional development way to understand ThingWorx. That why they try to use JS to control widget.

Top Tags