Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I am developing my own thingwork experience. I have to make two buttons, which when clicked will lead to some web page. I am able to do that using hyperlink widget. But I need to make that as buttons.How can I achieve that?
Solved! Go to Solution.
Dipika,
That is an expected behavior. Button widget can't be used for redirecting to a webpage, it is recommended to use hyperlink widget.
Button widget is restricted to trigger a service, however you can write to JS code/function for Button widget, click on JS area (next to Click property) where you can write the function that needs to be triggered. The function script can be written home.js area.
In the othercase, on button click you can execute a TWX service that inturn makes a request to the webpage. I din't actually try this, but may be worth a try.
Thanks,
Giri
You may have two buttons widget and two navigation widget ... bind the click event of both buttons to navigate of navigation widget each.
Also as you say web page redirect and not mashups you may need to include iframe on both 2 navigation widget mashups to have source url as your web page
that you need to redirect.
Nilesh, Appreciate your reply, if I'm not wrong, you must be answering in the context of ThingWorx Platform. But the Question is about ThingWorx Studio, which is an AR product.
Dipika,
That is an expected behavior. Button widget can't be used for redirecting to a webpage, it is recommended to use hyperlink widget.
Button widget is restricted to trigger a service, however you can write to JS code/function for Button widget, click on JS area (next to Click property) where you can write the function that needs to be triggered. The function script can be written home.js area.
In the othercase, on button click you can execute a TWX service that inturn makes a request to the webpage. I din't actually try this, but may be worth a try.
Thanks,
Giri